mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
call remove_done_callback in finally section (#1688)
This commit is contained in:
parent
002665a9da
commit
21b3e04c13
1 changed files with 2 additions and 1 deletions
|
@ -458,6 +458,7 @@ class BaseEventLoop(events.AbstractEventLoop):
|
||||||
# local task.
|
# local task.
|
||||||
future.exception()
|
future.exception()
|
||||||
raise
|
raise
|
||||||
|
finally:
|
||||||
future.remove_done_callback(_run_until_complete_cb)
|
future.remove_done_callback(_run_until_complete_cb)
|
||||||
if not future.done():
|
if not future.done():
|
||||||
raise RuntimeError('Event loop stopped before Future completed.')
|
raise RuntimeError('Event loop stopped before Future completed.')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue