摘要:
异步执行比同步执行根据任务量可以快数倍乃至n倍 阅读全文
摘要:
遇到IO阻塞自动切换(推荐) 阅读全文
摘要:
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 阅读全文