mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
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:
parent
5aa62a8de1
commit
0362cbf908
15 changed files with 192 additions and 11 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue