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

Matt Spitz report at bugs.python.org
Mon Aug 17 16:59:00 CEST 2015


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 avoid creating unnecessary threads.

----------
messages: 248732
nosy: Matt Spitz
priority: normal
severity: normal
status: open
title: ThreadPoolExceutor doesn't reuse threads until #threads == max_workers
type: behavior

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


More information about the Python-bugs-list mailing list