Message188626
> 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. |
|
Date |
User |
Action |
Args |
2013-05-07 07:17:17 | vstinner | set | recipients:
+ vstinner, pitrou, nedbat, trent, neologix, kushal.das |
2013-05-07 07:17:17 | vstinner | set | messageid: <1367911037.56.0.199898332543.issue17914@psf.upfronthosting.co.za> |
2013-05-07 07:17:17 | vstinner | link | issue17914 messages |
2013-05-07 07:17:17 | vstinner | create | |
|