summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-10-01 18:10:04 (GMT)
committerPablo Galindo <pablogsal@gmail.com>2022-10-24 16:09:37 (GMT)
commitf0083923faa1759e4770cf03bd45312fea6df729 (patch)
tree2dedbea38fb92cef666f53c75cfb00ba27937c0a /Lib/asyncio/tasks.py
parentc184c6750e40ca4ffa4f62a5d145b892cbd066bc (diff)
downloadcpython-f0083923faa1759e4770cf03bd45312fea6df729.zip
cpython-f0083923faa1759e4770cf03bd45312fea6df729.tar.gz
cpython-f0083923faa1759e4770cf03bd45312fea6df729.tar.bz2
gh-90908: Document asyncio.Task.cancelling() and asyncio.Task.uncancel() (GH-95253)
Co-authored-by: Thomas Grainger <tagrain@gmail.com> (cherry picked from commit f00645d5dbf4cfa0b8f382c8977724578dff191d) Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r--Lib/asyncio/tasks.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index 56a355c..e48da0f 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -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.
"""