[issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads
Yury Selivanov
report at bugs.python.org
Mon Sep 9 05:43:07 EDT 2019
Yury Selivanov <yselivanov at gmail.com> added the comment:
Here's the API I propose to solve this problem: https://github.com/python/cpython/pull/15735#pullrequestreview-285389412
Summary:
* Add a new loop.shutdown_threadpool() method. Just like with shutdown_asyncgens() -- it would be invalid to call loop.run_in_executer() after loop.shutdown_threadpool() is called.
* Make asyncio.run() to call the new loop.shutdown_threadpool().
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34037>
_______________________________________
More information about the Python-bugs-list
mailing list