Python hangs up on returning from a function

一笑奈何 提交于 2019-12-01 08:57:39

"It's not a bug, it's a feature"

Python was hanging up when trying to garbage collect the objects and closing the ZMQ IPC socket which was not opened due to the endpoint not being there (which is normal, as I'm doing testing). Apparently, in this scenario, ZMQ is meant to hang up indefinitely (which took me a long time to figure out since this is not documented anywhere). This can be avoided by setting the LINGER property of the ZMQ socket, which resolved the issue.

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