What exactly is wrong with using pymongo in twisted?

好久不见. 提交于 2019-12-05 18:29:35
Mike Lutz

In short: pymongo calls are blocking, when ran they freeze the twisted engine until the call returns, which is randomly destructive to twisted internal state because it's the opposite of what twisted is designed for.

Instead you should look for a twisted comparable driver such as tx-mongo. tx-mongo has a smaller audience then pymongo, and so its documentation is comparably a bit rough but you should be able to find all you need in it's example directory.

Background: Threading vs Event programing

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