Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(runqueue): Add id for tracking function execution #401

Merged
merged 3 commits into from
Mar 8, 2025

Conversation

finger563
Copy link
Contributor

@finger563 finger563 commented Mar 8, 2025

Description

  • Update runqueue to generate and store an ID associated with each function, returning the id when functions are added to the queue
  • Allow querying of the ids currently in the queue or running
  • Allow removal of functions by id from the queue
  • Update example to test and showcase new APIs

Motivation and Context

Allows callers to track if their function is currently in the queue or has finished executing (no longer in the queue or running). Also allows callers to remove the function from the queue if it is no longer needed to run.

How has this been tested?

  • Build and run runqueue/example on QtPy ESP32s3 and ensure it works.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

CleanShot 2025-03-07 at 22 13 10@2x

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

* Update runqueue to generate and store an ID associated with each function, returning the id when functions are added to the queue
* Allow querying of the ids currently in the queue or running
* Allow removal of functions by id from the queue
* Update example to test and showcase new APIs

Allows callers to track if their function is currently in the queue or has finished executing (no longer in the queue or running). Also allows callers to remove the function from the queue if it is no longer needed to run.

* Build and run `runqueue/example` on QtPy ESP32s3 and ensure it works.
@finger563 finger563 self-assigned this Mar 8, 2025
@finger563 finger563 added enhancement New feature or request run queue labels Mar 8, 2025
Copy link

github-actions bot commented Mar 8, 2025

✅Static analysis result - no issues found! ✅

@finger563 finger563 merged commit 68daa49 into main Mar 8, 2025
75 checks passed
@finger563 finger563 deleted the feat/runqueue-ids branch March 8, 2025 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request run queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant