2019年12月16日
摘要: join主进程等待子进程 import time from multiprocessing import Process def func(name): print(f"我是{name}开始") time.sleep(0.5) print(f"我是{name}结束") if __name__ == 阅读全文
posted @ 2019-12-16 20:35 lilyxiaoyy 阅读(2215) 评论(0) 推荐(0) 编辑
摘要: 写法1 import time from multiprocessing import Process def func(name, age): print(f"我是{name}") time.sleep(0.2) print(f"{name}结束 {age}") if __name__ == '_ 阅读全文
posted @ 2019-12-16 20:29 lilyxiaoyy 阅读(4417) 评论(0) 推荐(1) 编辑

返回
顶部