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>
This commit is contained in:
Donghee Na 2023-10-10 19:00:09 +09:00 committed by GitHub
parent 5aa62a8de1
commit 0362cbf908
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 192 additions and 11 deletions

View file

@ -1138,7 +1138,7 @@ if name == 'nt':
)
if _exists('sched_getaffinity'):
if _exists('sched_getaffinity') and sys._get_cpu_count_config() < 0:
def process_cpu_count():
"""
Get the number of CPUs of the current process.