summaryrefslogtreecommitdiff
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorMarat Sharafutdinov <decaz89@gmail.com>2017-11-07 12:06:05 +0300
committerAndrew Svetlov <andrew.svetlov@gmail.com>2017-11-07 12:06:05 +0300
commit69cfed1cd7be968fa4f6c69eb6dccc94bce5d45c (patch)
treea00a949294321c72c6e3d6286452c290252d3340 /Lib/asyncio
parent088929cf62fa22c06f6a44e25915abce9048a545 (diff)
downloadcpython-git-69cfed1cd7be968fa4f6c69eb6dccc94bce5d45c.tar.gz
Add asyncio.Handle.cancelled() method (#2388)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/events.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
index c2663c5062..270a5e4c33 100644
--- a/Lib/asyncio/events.py
+++ b/Lib/asyncio/events.py
@@ -117,6 +117,9 @@ class Handle:
self._callback = None
self._args = None
+ def cancelled(self):
+ return self._cancelled
+
def _run(self):
try:
self._callback(*self._args)