What is the cleanest way to stop a python multiprocessing worker attached to a queue in an infinite loop?

 ̄綄美尐妖づ 提交于 2019-12-04 22:37:37

I figured out the problem. According to documentation for multiprocessing.Pool.join(), pool needs to be close()ed before it can be join()ed. Adding pool.close() before pool.join() solved the problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!