mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.13] gh-132354: document return value for asyncio.Task.cancel
(GH-132374) (#132465)
gh-132354: document return value for `asyncio.Task.cancel` (GH-132374)
(cherry picked from commit 64b066ad29
)
Co-authored-by: Felix Scherz <felixwscherz@gmail.com>
This commit is contained in:
parent
244a642443
commit
ff66901d8a
2 changed files with 5 additions and 1 deletions
|
@ -1336,7 +1336,10 @@ Task Object
|
|||
|
||||
Request the Task to be cancelled.
|
||||
|
||||
This arranges for a :exc:`CancelledError` exception to be thrown
|
||||
If the Task is already *done* or *cancelled*, return ``False``,
|
||||
otherwise, return ``True``.
|
||||
|
||||
The method arranges for a :exc:`CancelledError` exception to be thrown
|
||||
into the wrapped coroutine on the next cycle of the event loop.
|
||||
|
||||
The coroutine then has a chance to clean up or even deny the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue