I am using 'multiprocess.Pool.imap_unordered' as following
from multiprocessing import Pool
pool = Pool()
for mapped_result in pool.imap_unordered(mapping_func, args_iter):
do some additional processing on mapped_result
Do I need to call pool.close
or pool.join
after the for loop?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…