-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-46771: cancel counts #31434
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
bpo-46771: cancel counts #31434
Conversation
4526894
to
b32bbf9
Compare
I like it! |
@asvetlov this is a competing proposal to using the |
I understand. |
@asvetlov Cool, but you'll need to merge this :) |
@asvetlov: Please replace |
Done. Thanks! |
Changes:
Task._cancel_requested: bool
is nowTask._num_cancels_requested: int
Task.cancelling
now returns an intTask.uncancel
also returns an int, the number of remaining cancel requests__exit__
, and propagates the CancelError if there are more cancel requestsCancelScope.cancelled
is now a propertyI have not updated any of the comments or docs yet.
https://bugs.python.org/issue46771