diff options
author | Charles-François Natali <cf.natali@gmail.com> | 2013-06-28 17:25:45 (GMT) |
---|---|---|
committer | Charles-François Natali <cf.natali@gmail.com> | 2013-06-28 17:25:45 (GMT) |
commit | 37cfb0a920bd01ee81ce7bebebfe510d01d751d6 (patch) | |
tree | fdbb1f0eee3f4f5addd815279af456aa686dccf5 /Lib/concurrent/futures | |
parent | c723da361a8d5129ec9bd336e6327a65b4e92148 (diff) | |
download | cpython-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/futures')
-rw-r--r-- | Lib/concurrent/futures/process.py | 2 |
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 |