summaryrefslogtreecommitdiffstats
path: root/Lib/concurrent
diff options
context:
space:
mode:
authorCharles-François Natali <cf.natali@gmail.com>2013-06-28 17:25:45 (GMT)
committerCharles-François Natali <cf.natali@gmail.com>2013-06-28 17:25:45 (GMT)
commit37cfb0a920bd01ee81ce7bebebfe510d01d751d6 (patch)
treefdbb1f0eee3f4f5addd815279af456aa686dccf5 /Lib/concurrent
parentc723da361a8d5129ec9bd336e6327a65b4e92148 (diff)
downloadcpython-37cfb0a920bd01ee81ce7bebebfe510d01d751d6.zip
cpython-37cfb0a920bd01ee81ce7bebebfe510d01d751d6.tar.gz
cpython-37cfb0a920bd01ee81ce7bebebfe510d01d751d6.tar.bz2
Issue #17914: Use os.cpu_count() instead of multiprocessing.cpu_count() where
applicable.
Diffstat (limited to 'Lib/concurrent')
-rw-r--r--Lib/concurrent/futures/process.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/concurrent/futures/process.py b/Lib/concurrent/futures/process.py
index 3c20b93..abb99d6 100644
--- a/Lib/concurrent/futures/process.py
+++ b/Lib/concurrent/futures/process.py
@@ -331,7 +331,7 @@ class ProcessPoolExecutor(_base.Executor):
_check_system_limits()
if max_workers is None:
- self._max_workers = multiprocessing.cpu_count()
+ self._max_workers = os.cpu_count() or 1
else:
self._max_workers = max_workers