Repository navigation
gh-108951: document addition of TaskGroup.cancel() #149031
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
Changes from 2 commits
2bf9185
e6a42b9
ccdc58e
c67dbab
305ad78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| Add :meth:`~asyncio.TaskGroup.cancel` which cancels unfinished tasks and exits the group without error. | ||
| Add :meth:`~asyncio.TaskGroup.cancel` which cancels unfinished tasks and exits the group without raising :exc:`asyncio.CancelledError`. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm still not sure if the explicit "and exits the group without raising :exc:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Further, this still begs to question why you said "without raising :exc:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well, if you check the long discussions in the impl PR, there was quite a bit made about possible confusion from expecting TaskGroup.cancel() to behave like Task.cancel(). So this is being explicit that unlike the latter, TaskGroup.cancel() does not cause anything to raise CancelledError.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this could be reworded: Add :meth: Thoughts?
picnixz marked this conversation as resolved.
Resolved
|
||
Uh oh!
There was an error while loading. Please reload this page.