This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hniksic
Recipients aeros, asvetlov, bquinlan, hniksic, pitrou, torsten
Date 2020-04-14.20:01:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> 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.
Date User Action Args
2020-04-14 20:01:55hniksicsetrecipients: + hniksic, bquinlan, pitrou, asvetlov, torsten, aeros
2020-04-14 20:01:55hniksicsetmessageid: <>
2020-04-14 20:01:55hniksiclinkissue36780 messages
2020-04-14 20:01:55hniksiccreate