……

并发模块concurrent

https://www.cnblogs.com/gaidy/p/11156734.html
https://docs.python.org/zh-cn/3.8/library/concurrent.futures.html#

import time
from concurrent.futures import ProcessPoolExecutor

work_count = 5

def seckill():
print(time.time())

with ProcessPoolExecutor(work_count) as pool:
for i in range(work_count):
pool.submit(seckill)

posted on 2021-01-15 19:23  Exlo  阅读(105)  评论(0编辑  收藏  举报

导航