因此,在运行第二个pool.map之前,我需要确保为所有参数执行了function1。有谁能教我怎么做吗?# The first multiprocessing unit new_args=dict(pool.map(function1, args))
pool.map(function2, new_args)
谢谢
在使用multiprocessing.pool和pool.map时,似乎必须在创建池之前定义映射函数。为什么有这个必要?import multiprocessing
return x * x
my_list = _pool.map_pool = multiprocessing.Pool()
return x * x
my_list = _pool.map(my_power, list(range