python 等待进程退出
时间: 2023-09-27 16:08:09 浏览: 163
等待一个已经运行的程序结束
Python可以使用join()方法来等待进程退出。主进程可以调用join()方法来等待多个子进程运行完毕后再继续执行。join()方法只能等待由start()方法开启的进程,而不能等待由run()方法开启的进程。通过调用join()方法,可以保证主进程在所有子进程执行完毕后再退出。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [python程序示例-python示例程序](https://blog.csdn.net/weixin_37988176/article/details/109376869)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [6.python之进程](https://blog.csdn.net/weixin_42392054/article/details/111943384)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文