multiprocessing question
Neal Becker
ndbecker2 at gmail.com
Mon Jan 18 21:18:26 EST 2010
I'm using multiprocessing as a crude batch queuing system, like this:
import my_test_program as prog
(where my_test_program has a function called 'run')
def run_test (args):
prog.run (args[1:])
cases = []
for t in test_conditions:
args = [prog.__name__]+[more args...]
cases.append (args)
(leaving out details, but 'cases' will be the list of test cases to run)
results = pool.map (run_test, cases)
Problem is, it doesn't seem to keep all my cpus busy, even though there are
more test cases than cpus. Ideas?
More information about the Python-list
mailing list