没有合适的资源?快使用搜索试试~ 我知道了~
通过多进程处理相关任务 import multiprocessing as mp def process_fnc(x): x+=1 return x with mp.Pool(processes=36) as pool: x_list=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36] results = [pool.apply_async(process_fnc, args=(x,)) for x in x_list] output = [p.get() for p in results] print(output)
资源推荐
资源评论
资源评论
MLPlatform
- 粉丝: 6
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功