[issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors

Hrvoje Nikšić report at bugs.python.org
Tue May 7 10:41:40 EDT 2019


Hrvoje Nikšić <hniksic at gmail.com> added the comment:

> Are you interested in writing a patch?

Yes - I wanted to check if there is interest in the feature before I commit time to write the patch, documentation, tests, etc. (And also I wanted to check if there's a better way to do it.)

In any case, thanks for picking up on this.

> `disown` might not be the best name - maybe `allow_shutdown` or something.

Disown is an admittedly obscure reference to the shell built-in of the same name (https://tinyurl.com/qfn8ao7). The idea is to get the point across that the pool is truly abandoned, and its running futures are left to their own devices. Maybe wait_at_exit would be a clearer name:

    pool.shutdown(wait=False, wait_at_exit=True)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36780>
_______________________________________


More information about the Python-bugs-list mailing list