摘要: 异步执行比同步执行根据任务量可以快数倍乃至n倍 阅读全文
posted @ 2017-08-31 16:52 一石数字欠我15w!!! 阅读(487) 评论(0) 推荐(0) 编辑
摘要: 遇到IO阻塞自动切换(推荐) 阅读全文
posted @ 2017-08-31 16:14 一石数字欠我15w!!! 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 1 from concurrent.futures import ProcessPoolExecutor 2 import os,time,random 3 def task(n): 4 print('%s is running'%os.getpid()) 5 time.sleep(random.r 阅读全文
posted @ 2017-08-31 15:47 一石数字欠我15w!!! 阅读(320) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示