Add asyncio.Handle.cancelled() method (#2388)

This commit is contained in:
Marat Sharafutdinov 2017-11-07 12:06:05 +03:00 committed by Andrew Svetlov
parent 088929cf62
commit 69cfed1cd7
4 changed files with 14 additions and 4 deletions

View file

@ -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)