-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-109649: Use os.process_cpu_count() #110165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
Example:
|
Replace os.cpu_count() with os.process_cpu_count() in programs:
multissltests.py and wasm_build.py use the code below to keep support for old Python versions: if hasattr(os, 'process_cpu_count'):
jobs = os.process_cpu_count()
else:
jobs = os.cpu_count() |
|
|
|
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.
Replace os.cpu_count() with os.process_cpu_count() in modules:
Replace os.cpu_count() with os.process_cpu_count() in programs:
Other changes:
📚 Documentation preview 📚: https://cpython-previews--110165.org.readthedocs.build/