Trent Nelson added the comment:
On Tue, Mar 19, 2013 at 01:58:59AM -0700, John Szakmeister wrote:
>
> John Szakmeister added the comment:
>
> Actually, Trent's version looks at hw.logicalcpu and then falls back
> to hw.ncpu, if there was an error. Given the state of the
> documentation on these parameters, it's hard to say whether it's right
> or wrong, but at least hw.logicalcpu scales correctly if I disable
> some of the processors.
That's pretty much the rationale I used. I tested the fallback on
OS X manually (i.e. the _bsd_cpu_count()), and that works, and the
hw.logicalcpu definitely works in the first place, so, I figured it
was good enough.
I'll raise a new issue for os.cpu_count().
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17444>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com