summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-10-21 21:23:35 (GMT)
committerYury Selivanov <yury@magic.io>2016-10-21 21:23:35 (GMT)
commite145efcd7a6e72f3190ea0934a1101cd45ee3c08 (patch)
tree1cd7c5cf249d4ffb02cbbf8e210b323cd7fdfc9b /Lib/asyncio
parented0540698ef2ea66dfd662ac6e98a15e8eabf365 (diff)
parent3d67615a485f4769eec5927e17989b31d6917e1c (diff)
downloadcpython-e145efcd7a6e72f3190ea0934a1101cd45ee3c08.zip
cpython-e145efcd7a6e72f3190ea0934a1101cd45ee3c08.tar.gz
cpython-e145efcd7a6e72f3190ea0934a1101cd45ee3c08.tar.bz2
Merge 3.5 (issue #26923)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/tasks.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index 14949d1..8852aa5 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -592,9 +592,11 @@ class _GatheringFuture(futures.Future):
def cancel(self):
if self.done():
return False
+ ret = False
for child in self._children:
- child.cancel()
- return True
+ if child.cancel():
+ ret = True
+ return ret
def gather(*coros_or_futures, loop=None, return_exceptions=False):