from multiprocess import Pool
with Pool() as pool:
# input_list: [input1, input2, input3...]
for output in pool.imap_unordered(func, input_list):
# do something
def func(input):
# do something
return output
from multiprocess import Pool
with Pool() as pool:
# input_list: [input1, input2, input3...]
for output in pool.imap_unordered(func, input_list):
# do something
def func(input):
# do something
return output