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

Adds failing test for cancelling multiple concurrent async inputs gracefully #1471

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

Conversation

freider
Copy link
Contributor

@freider freider commented Mar 4, 2024

This adds a (currently failling) test that we can cancel multiple async inputs at the same time without terminating the container or unaffected inputs.

We should be able to refactor the container entrypoint to cancel inputs in case of async functions by keeping a map of input_id -> asyncio task and then only cancelling the task(s) related to the relevant input ids.

This has several advantages:

  • We can gracefully terminate multiple async inputs without affecting other concurrent inputs in the same container
  • It would let the SIGUSR1/SIGINT triggers be reserved only for the non-async case (sigusr1 without concurrency and sigint/task termination for input_concurrency > 1).
  • We can probably get rid of the ugly "global marker" cancellation message hack for older Python, since it would then only be the user catching these cancellations anyway.

cc @ekzhang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant