Message366439
> 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:55 | hniksic | set | recipients:
+ hniksic, bquinlan, pitrou, asvetlov, torsten, aeros |
2020-04-14 20:01:55 | hniksic | set | messageid: <1586894515.54.0.829685448159.issue36780@roundup.psfhosted.org> |
2020-04-14 20:01:55 | hniksic | link | issue36780 messages |
2020-04-14 20:01:55 | hniksic | create | |
|