[New-bugs-announce] [issue10437] ThreadPoolExecutor should accept max_workers=None

Daniel Stutzbach 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?

assignee: stutzbach
components: Library (Lib)
messages: 121311
nosy: bquinlan, stutzbach
priority: normal
severity: normal
stage: needs patch
status: open
title: ThreadPoolExecutor should accept max_workers=None
type: behavior
versions: Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list