mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-90908: Document asyncio.Task.cancelling() and asyncio.Task.uncancel() (#95253)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
This commit is contained in:
parent
273a819ed2
commit
f00645d5db
3 changed files with 256 additions and 82 deletions
|
@ -243,8 +243,8 @@ class Task(futures._PyFuture): # Inherit Python Task implementation
|
|||
def uncancel(self):
|
||||
"""Decrement the task's count of cancellation requests.
|
||||
|
||||
This should be used by tasks that catch CancelledError
|
||||
and wish to continue indefinitely until they are cancelled again.
|
||||
This should be called by the party that called `cancel()` on the task
|
||||
beforehand.
|
||||
|
||||
Returns the remaining number of cancellation requests.
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue