Author pitrou
Recipients amaury.forgeotdarc, anacrolix, benjamin.peterson, georg.brandl, giampaolo.rodola, neologix, pitrou, python-dev, rosslagerwall, vstinner
Date 2012-08-04.00:35:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1344040502.04.0.954359099876.issue12655@psf.upfronthosting.co.za>
In-reply-to
Content
> Is it possible to get the number of CPU to be able to convert a Python 
> set to a cpu_set?

sched_getaffinity returns EINVAL if the cpu_set is too small, so it should be easy enough to iterate.
I agree the API should be changed for something saner, and before 3.3. Sorry for not looking at the patch in more detail when it was first submitted. I will try to cook up a new patch this week-end.
History
Date User Action Args
2012-08-04 00:35:02pitrousetrecipients: + pitrou, georg.brandl, amaury.forgeotdarc, vstinner, giampaolo.rodola, benjamin.peterson, anacrolix, neologix, rosslagerwall, python-dev
2012-08-04 00:35:02pitrousetmessageid: <1344040502.04.0.954359099876.issue12655@psf.upfronthosting.co.za>
2012-08-04 00:35:01pitroulinkissue12655 messages
2012-08-04 00:35:00pitroucreate