def run_pp(n, body):
"""Process Pool.map"""
from multiprocessing.pool import Pool
global reused_pool, numthreads
global args
if 'reused_pool' not in globals():
log.debug("Creating Pool(%s)" % numthreads)
reused_pool = Pool(int(numthreads))
reused_pool.map(body, n)
评论列表
文章目录