This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients kushal.das, nedbat, neologix, pitrou, trent, vstinner
Date 2013-05-07.07:17:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367911037.56.0.199898332543.issue17914@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2013-05-07 07:17:17vstinnersetrecipients: + vstinner, pitrou, nedbat, trent, neologix, kushal.das
2013-05-07 07:17:17vstinnersetmessageid: <1367911037.56.0.199898332543.issue17914@psf.upfronthosting.co.za>
2013-05-07 07:17:17vstinnerlinkissue17914 messages
2013-05-07 07:17:17vstinnercreate