Matt Spitz added the comment:
On further investigation, it appears that we can't just check against the queue
length, as it doesn't indicate whether threads are doing work or idle.
A change here will need a counter/semaphore to keep track of the number of
idle/working threads, whic
Changes by Matt Spitz :
--
title: ThreadPoolExceutor doesn't reuse threads until #threads == max_workers
-> ThreadPoolExecutor doesn't reuse threads until #threads == max_workers
___
Python tracker
<http://bugs.pytho
New submission from Matt Spitz:
https://hg.python.org/cpython/file/3.4/Lib/concurrent/futures/thread.py#l114
ThreadPoolExecutor will keep spawning new threads, even if existing threads are
waiting for new work. We should check against the queue length when deciding to
spawn a new thread to