[issue17444] multiprocessing.cpu_count() should use hw.availcpu on Mac OS X

Ronald Oussoren report at bugs.python.org
Tue Mar 19 09:07:46 CET 2013


Ronald Oussoren added the comment:

I also like the os.cpu_count() function, the information is useful sometimes outside of multiprocessing, and calling out to external scripts to gather the information (as multiprocessing currently does) feels yucky.

That should probably be a new issue, the change in this issue fixes a real problem  (the cpu count code in multiprocessing can overestimate the usable CPU count on OSX) and is a bugfix that should be backported to the stable branches.

BTW. Trent's os.cpu_count implementation also uses hw.ncpu and is therefore also broken on OSX.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17444>
_______________________________________


More information about the Python-bugs-list mailing list