Skip to content

Remove task in handle_tasks in async_compute example #20175

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IceSentry
Copy link
Contributor

Objective

  • It seems counterintuitive that the task removes itself
  • More than once I have tried copying the code from this example and then remove the content of the task to replace it with what I need and then I get errors about a task being polled after it's already completed because I never removed it.

Solution

  • Remove the task in the handle_tasks system after it's done being "handled".

Testing

  • Ran the example and it still works as expected

@IceSentry IceSentry added C-Docs An addition or correction to our documentation C-Examples An addition or correction to our examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward D-Straightforward Simple bug fixes and API improvements, docs, test and examples A-Tasks Tools for parallel and async work labels Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Tasks Tools for parallel and async work C-Docs An addition or correction to our documentation C-Examples An addition or correction to our examples D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants