mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-36613: call remove_done_callback if exception (GH-12800)
Call remove_done_callback() in finally block. https://bugs.python.org/issue36613
This commit is contained in:
parent
4461d704e2
commit
c1964e9e21
2 changed files with 3 additions and 1 deletions
|
@ -495,10 +495,11 @@ async def _wait(fs, timeout, return_when, loop):
|
|||
finally:
|
||||
if timeout_handle is not None:
|
||||
timeout_handle.cancel()
|
||||
for f in fs:
|
||||
f.remove_done_callback(_on_completion)
|
||||
|
||||
done, pending = set(), set()
|
||||
for f in fs:
|
||||
f.remove_done_callback(_on_completion)
|
||||
if f.done():
|
||||
done.add(f)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue