mirror of
https://github.com/python/cpython
synced 2026-09-29 09:55:31 +03:00
Merge 3.5 (issue #26923)
This commit is contained in:
commit
e145efcd7a
3 changed files with 38 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue