Hrvoje Nikšić <hnik...@gmail.com> added the comment: > The only way I could see this to work as intended without making any changes > to threading would be to optionally use daemon threads and avoid joining the > threads in `executor.shutdown()` if `wait_at_exit` is set to False in the > constructor for the executor.
Agreed, and that is precisely what I suggested in my previous comment. The attached PR already deals with the executor-specific part of the wait, but it would be straightforward to have it also affect the executor to create daemon threads, and the flag moved to the constructor. > IMO, it also would require some fairly extensive testing to make sure it > works as intended, which the patch currently lacks. It is quite easy to check that a hanging thread (emulated by a simple sleep) is not joined by the executor with the appropriate flag set. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36780> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com