import threading # 导入包
# 定义线程
threading_1 = threading.Thread(target=threading_func, args=(...))
threading_1 = threading.Thread(target=threading_func, args=(...))
threading_1 = threading.Thread(target=threading_func, args=(...))
# 启动线程
threading_1.start()
threading_2.start()
threading_3.start()
# 子线程完成运行之前,这个子线程的父线程将一直被阻塞
threading_1.join()
threading_2.join()
threading_3.join()
python 多线程
最新推荐文章于 2023-02-15 19:59:58 发布