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

Add shutdown timeout to PersistentTaskGroup #33

Open
achimnol opened this issue Feb 15, 2022 · 1 comment
Open

Add shutdown timeout to PersistentTaskGroup #33

achimnol opened this issue Feb 15, 2022 · 1 comment
Labels

Comments

@achimnol
Copy link
Owner

Currently PersistentTaskGroup immediately cancels all non-finished tasks upon shutdown.
Let's add an option for configurable timeout here, so that the individual tasks may have chances to finish up before being cancelled.

@achimnol
Copy link
Owner Author

achimnol commented Feb 24, 2022

We could use two-phase cancellation: requesting cancellation after 1st timeout, cancel cancellation after 2nd timeout if it takes too long, with help of Task.uncancel() and cancellation scopes to be introduced in Python 3.11.

refs python/cpython#31513

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

No branches or pull requests

1 participant