iunknwn <sz2...@gmail.com> added the comment:

The existing behavior seems strange (and isn't well documented). The code had a 
TODO comment from bquinlan to implement idle thread recycling, so that was why 
I made the change. 

That said, if threads are cheap, why not just create all the work threads on 
initialization, and then remove all the logic entirely?

Also, regarding the executor and thread-safety, there's an example in the 
current docs showing a job being added to the executor from a worker thread 
(it's part of the example on deadlocks, but it focuses on max worker count, not 
on the executor's thread-safety).


Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list

Reply via email to