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 the ability for cancel scopes to specify a grace period #921

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

Conversation

oremanj
Copy link
Member

@oremanj oremanj commented Feb 11, 2019

Fixes #147.

I know there's still some debate in #147 about what form this should take, but I wanted to provide an example of what "Type 2" graceful cancellation might look like. I'm open to suggestions on the names.

(You can implement "Type 1" easily in terms of "Type 2"; just write with trio.shield_during_cleanup(): around each request. It probably wants a different name in that case, though.)

@oremanj oremanj requested a review from njsmith February 11, 2019 13:40
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.

1 participant