In the Python multiprocessing library, is there a variant of pool.map which supports multiple arguments?
multiprocessing
pool.map
text = "test" def
A better solution for python2:
from multiprocessing import Pool def func((i, (a, b))): print i, a, b return a + b pool = Pool(3) pool.map(func, [(0,(1,2)), (1,(2,3)), (2,(3, 4))])
2 3 4
1 2 3
0 1 2
out[]:
[3, 5, 7]