diff options
author | Victor Stinner <vstinner@python.org> | 2023-10-01 01:14:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-01 01:14:57 (GMT) |
commit | a46e96076898d126c9f276aef1934195aac34b4e (patch) | |
tree | beaec25a75f381f77b74bf4e164eb813c20ec81f /Doc/whatsnew | |
parent | 53eb9a676f8c59b206dfc536b7590f6563ad65e0 (diff) | |
download | cpython-a46e96076898d126c9f276aef1934195aac34b4e.zip cpython-a46e96076898d126c9f276aef1934195aac34b4e.tar.gz cpython-a46e96076898d126c9f276aef1934195aac34b4e.tar.bz2 |
gh-109649: Use os.process_cpu_count() (#110165)
Replace os.cpu_count() with os.process_cpu_count() in modules:
* compileall
* concurrent.futures
* multiprocessing
Replace os.cpu_count() with os.process_cpu_count() in programs:
* _decimal deccheck.py test
* freeze.py
* multissltests.py
* python -m test (regrtest)
* wasm_build.py
Other changes:
* test.pythoninfo logs os.process_cpu_count().
* regrtest gets os.process_cpu_count() / os.cpu_count() in headers.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.13.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 484443a..a789084 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -91,6 +91,13 @@ Other Language Changes of the ``optimize`` argument. (Contributed by Irit Katriel in :gh:`108113`). +* :mod:`multiprocessing`, :mod:`concurrent.futures`, :mod:`compileall`: + Replace :func:`os.cpu_count` with :func:`os.process_cpu_count` to select the + default number of worker threads and processes. Get the CPU affinity + if supported. + (Contributed by Victor Stinner in :gh:`109649`.) + + New Modules =========== |