首页 > 数据库技术 > 详细

gevent mysql

时间:2018-05-08 12:50:40      阅读:235      评论:0      收藏:0      [点我收藏+]

使用gevent实现mysql并发时,每个greenlet应该独享一个mysql连接,否则,不同的greenlet之间会相互影响。

ultramysql doesn‘t allow you to make multiple queries on the same mysql connection, it just makes it async friendly. So you will either need a new mysql connection for each greenlet or use locking primitives to makes sure only one greenlet is using the connection at a time.

https://stackoverflow.com/questions/13308446/how-to-insert-async-into-mysql-using-python

gevent mysql

原文:https://www.cnblogs.com/buxizhizhoum/p/9007477.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!