from multiprocessing import Process
from time import sleep
def work1(interval):
print('执行work1')
sleep(interval)
print('end work1')
def work2(interval):
print
如何使用python创建多个任务
最新推荐文章于 2024-02-27 13:26:42 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
from multiprocessing import Process
from time import sleep
def work1(interval):
print('执行work1')
sleep(interval)
print('end work1')
def work2(interval):
print