[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

Antoine Pitrou report at bugs.python.org
Sun Apr 8 14:33:07 EDT 2018


Antoine Pitrou <pitrou at free.fr> added the comment:

> If each worker thread ties up other resources in an application, such as handles to server connections, conserving threads could have a significant impact.

You may want to implement a pooling mechanism for those connections, independent of the thread pool.  It is also probably more flexible (you can implement whichever caching and lifetime logic benefits your application).

----------

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


More information about the Python-bugs-list mailing list