concurrent.futures 异步执行进程线程池的模块,一个抽象类,定义submit,map,shutdown方法 from concurrent.futures import ProcessPoolExecutor,ThreadPoolExecutor import time,os,random def task(n): print(os.getpid(),'is running') time.sleep(random.randint(,)) if __name__ == '__mai…