bpo-34037: Fix test_asyncio failure and add loop.shutdown_default_executor() (GH-15735)

This commit is contained in:
Kyle Stanley 2019-09-19 08:47:22 -04:00 committed by Andrew Svetlov
parent 3171d67a6a
commit 9fdc64cf12
6 changed files with 54 additions and 2 deletions

View file

@ -45,6 +45,7 @@ def run(main, *, debug=False):
try:
_cancel_all_tasks(loop)
loop.run_until_complete(loop.shutdown_asyncgens())
loop.run_until_complete(loop.shutdown_default_executor())
finally:
events.set_event_loop(None)
loop.close()