STINNER Victor added the comment:

> I don't see exactly what this C implementation brings over the one
> in multiprocessing (which is written in Python)?

multiprocessing.cpu_count() creates a subprocess on BSD and Darwin to get the 
number of CPU. Calling sysctl() or sysctlnametomib() should be faster and use 
less memory.

On Windows, GetSystemInfo() is called instead of reading an environment 
variable. I suppose that this function is more reliable.

Trent's os.cpu_count() returns -1 if the count cannot be read, 
multiprocessing.cpu_count() raises NotImplementedError.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17914>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to