[issue10437] ThreadPoolExecutor should accept max_workers=None
report at bugs.python.org
Tue Nov 16 20:36:14 CET 2010
New submission from Daniel Stutzbach <stutzbach at google.com>:
ProcessPoolExecutor allows the max_workers parameter to the constructor to be omitted or None, in which case it will set the max_workers based on the number of CPUs.
It would be nice if ThreadPoolExecutor's constructor worked the same way; having the same interface is one of the wonderful things about this pair of classes.
I have a patch pretty much ready (with tests and a doc update), but it causes concurrent/futures/thread.py to import multiprocessing. Were you trying to avoid that?
components: Library (Lib)
nosy: bquinlan, stutzbach
stage: needs patch
title: ThreadPoolExecutor should accept max_workers=None
versions: Python 3.2
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list