擅长:python、mysql、java
<p>有一种更干净的python方法来完成您想做的事情,它是通过使用<code>multiprocessing.Pool</code>提供的回调函数来实现的。</p>
<p>您可以检查<a href="https://stackoverflow.com/questions/33447055/python-multiprocess-pool-how-to-exit-the-script-when-one-of-the-worker-process/33450972#33450972">this question</a>以查看实现示例。</p>