mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #17914: Use os.cpu_count() instead of multiprocessing.cpu_count() where
applicable.
This commit is contained in:
parent
c723da361a
commit
37cfb0a920
4 changed files with 7 additions and 13 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue