import os import random import time from multiprocessing import Pool # Pool 进程池 def run(name): print('子进程%d启动--%s' % (name, os.getpid())) start = time.time() # 随机休眠1~3秒 time.sleep(random.randint(1, 3)) end = time.time() print('子进程%d结束--%s--耗时%0.2f' % (name, os.getpid(), end -