diff options
author | Donghee Na <donghee.na@python.org> | 2023-10-10 10:00:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-10 10:00:09 (GMT) |
commit | 0362cbf908aff2b87298f8a9422e7b368f890071 (patch) | |
tree | 7d5ae0e1f44801fe2102cb783938c60ef99b7ae4 /Doc/c-api | |
parent | 5aa62a8de15212577a13966710b3aede46e93824 (diff) | |
download | cpython-0362cbf908aff2b87298f8a9422e7b368f890071.zip cpython-0362cbf908aff2b87298f8a9422e7b368f890071.tar.gz cpython-0362cbf908aff2b87298f8a9422e7b368f890071.tar.bz2 |
gh-109595: Add -Xcpu_count=<n> cmdline for container users (#109667)
---------
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/init_config.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst index 56b4ee0..0240e25 100644 --- a/Doc/c-api/init_config.rst +++ b/Doc/c-api/init_config.rst @@ -878,6 +878,19 @@ PyConfig .. versionadded:: 3.12 + .. c:member:: int cpu_count + + If the value of :c:member:`~PyConfig.cpu_count` is not ``-1`` then it will + override the return values of :func:`os.cpu_count`, + :func:`os.process_cpu_count`, and :func:`multiprocessing.cpu_count`. + + Configured by the :samp:`-X cpu_count={n|default}` command line + flag or the :envvar:`PYTHON_CPU_COUNT` environment variable. + + Default: ``-1``. + + .. versionadded:: 3.13 + .. c:member:: int isolated If greater than ``0``, enable isolated mode: |