Author jorgsk
Recipients jorgsk
Date 2011-06-08.13:55:28
SpamBayes Score 1.11852e-09
Marked as misclassified No
Message-id <1307541329.07.0.743246465318.issue12285@psf.upfronthosting.co.za>
In-reply-to
Content
A normal way to start a multiprocessing-pool is like this:

Multiprocessing.Pool(processes=some_number).

However, if 'some_number' is 0 or negative, Python hangs and must be killed. I would expect an error message of the type: "Number of processes must be at least 1".

Attaching a script that reproduces this.

I struggled a bit with this for a program that uses cpu_count() - 4 to calculate 'some_number'. Guess what happens when the number of cores is 4 :) Even though the fix is easy (if some_number < 1), it would be nice to be warned about it.
History
Date User Action Args
2011-06-08 13:55:29jorgsksetrecipients: + jorgsk
2011-06-08 13:55:29jorgsksetmessageid: <1307541329.07.0.743246465318.issue12285@psf.upfronthosting.co.za>
2011-06-08 13:55:28jorgsklinkissue12285 messages
2011-06-08 13:55:28jorgskcreate