summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-06-02 21:08:52 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-06-02 21:08:52 (GMT)
commit06d736a8916b3ff603097cca105a206232593fae (patch)
treed6df523ba21d0ab3129733e0f3e1bf779c6ad911 /Lib/asyncio/tasks.py
parente7e1375e5796263a9d7279dc247d4f6bb4243a46 (diff)
parent8d21357fb5d15dcebb790a0594de3c7afddd8493 (diff)
downloadcpython-06d736a8916b3ff603097cca105a206232593fae.zip
cpython-06d736a8916b3ff603097cca105a206232593fae.tar.gz
cpython-06d736a8916b3ff603097cca105a206232593fae.tar.bz2
(Merge 3.4) Issue #21601: Document asyncio.Task.cancel(). Initial patch written
by Vajrasky Kok.
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 45a6342..2aa568b 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -269,9 +269,9 @@ class Task(futures.Future):
print(line, file=file, end='')
def cancel(self):
- """Request that a task to cancel itself.
+ """Request this task to cancel itself.
- This arranges for a CancellationError to be thrown into the
+ This arranges for a CancelledError to be thrown into the
wrapped coroutine on the next cycle through the event loop.
The coroutine then has a chance to clean up or even deny
the request using try/except/finally.