mirror of
https://github.com/python/cpython.git
synced 2025-08-07 10:28:42 +00:00
gh-90908: Document asyncio.Task.cancelling() and asyncio.Task.uncancel() (GH-95253)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
(cherry picked from commit f00645d5db
)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
c184c6750e
commit
f0083923fa
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