📜  并行运行具有多个参数的函数部分 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:29.082000             🧑  作者: Mango

代码示例1
>>> import functools

>>> partial_sum_four = functools.partial(sum_four, a, b, c)

>>> with Pool(processes=4) as pool:
         res = pool.map(partial_sum_four, ds)

>>> res
 [7, 8, 9, 10]