Merge 3.5 (issue #26923)

This commit is contained in:
Yury Selivanov 2016-10-21 17:23:35 -04:00
commit e145efcd7a
3 changed files with 38 additions and 2 deletions

View file

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