You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2017-05-23.07:37:31.504>created_at=<Date2017-05-21.13:44:28.150>labels= ['3.7', 'expert-asyncio']
title='[asyncio] orphan future close loop and cause "RuntimeError: Event loop stopped before Future completed."'updated_at=<Date2017-11-01.13:54:48.076>user='https://github.com/jimmylai'
Problem:
"RuntimeError: Event loop stopped before Future completed." throws when calling run_until_complete().
We investigate and find out some orphan futures stay in the event loop before we run another run_until_complete(another_async_func()).
The orphan future has pending state and is attached with _run_until_complete_cb from previous run_until_complete.
It happens because the orphan future thrown Exception and then raise, thus remove_done_callback(_run_until_complete_cb) didn't called.
Move it to finally section can fix it.
With this patch, we stop seeing the Runtime Error.
New changeset d1e3403 by Andrew Svetlov (jimmylai) in branch 'master':
[asyncio] bpo-30423: add regression test for orphan future causes "RuntimeError: Event loop stopped before Future completed." (bpo-3295) d1e3403
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: