How to combine multiprocessing and eventlet

安稳与你 提交于 2019-12-02 01:23:14

As of 2018-01, Eventlet and multiprocessing don't work well together. Your best option is to spawn worker processes externally. Second best option is os.fork() to create worker processes and only then import eventlet.

Subscribe to this issue to be notified when multiprocessing compatibility is resolved. https://github.com/eventlet/eventlet/issues/147

The main module should be importable for multiple process to work properly. Do not call main() in global space, use it like:

if name == 'main': main()

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