最佳答案
我正在使用“ multiprocess. Pool.imap _ unorder”,如下所示
from multiprocessing import Pool
pool = Pool()
for mapped_result in pool.imap_unordered(mapping_func, args_iter):
do some additional processing on mapped_result
在 for 循环之后,是否需要调用 pool.close
或 pool.join
?