I've got 4 nested loops, where I loop though lists of lists, and a function where I pass some arguments I get from the function, specifically:
def method(var1, var2 ....., var 16):
#computation
pool = Pool()
for values1 in list_of_values1:
#assign 4 variables from the list
for values2 in list_of_values2:
#assign 4 variables from list
for values3 in list_of_values3:
#assign 4 variables from list
for values4 in list_of_values4:
#assign 4 variables from list
method(var1, ..., var16)
I have tried using the
pool.map(method, [var1,..., var16]) in order to paralelize the whole process but it throws an error saying "method() takes exactly 16 arguments, 1 given"
I have also tried to use Threads but it does not improve much.
Grateful for the help!
Cheers
pool.mapcall?