We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6d943f commit 703ff46Copy full SHA for 703ff46
Lib/asyncio/tasks.py
@@ -887,13 +887,13 @@ def _done_callback(fut, cur_task):
887
# can't control it, disable the "destroy pending task"
888
# warning.
889
fut._log_destroy_pending = False
890
- if cur_task is not None:
891
- futures.future_add_to_awaited_by(fut, cur_task)
892
nfuts += 1
893
arg_to_fut[arg] = fut
894
if fut.done():
895
done_futs.append(fut)
896
else:
+ if cur_task is not None:
+ futures.future_add_to_awaited_by(fut, cur_task)
897
fut.add_done_callback(lambda fut: _done_callback(fut, cur_task))
898
899
0 commit comments