MongoDB Pool

38 views
Skip to first unread message

Creotiv

unread,
Dec 3, 2010, 5:57:13 AM12/3/10
to gevent: coroutine-based Python network library
I wrote some simple realization of pool for pymongo. You can see it
here: http://pastebin.com/z9nFYGa9

Base bug there was with pymongo.connection.Pool because in the
original package it is thread-local, so when you spawn new greenlet
and trying to get already open connection, it creates new connection
because in this greenlet pool is empty.

Matt Billenstein

unread,
Dec 3, 2010, 8:51:24 PM12/3/10
to gev...@googlegroups.com
Cool, does it make sense to integrate this into pymongo or gevent
somewhere?

m

--
Matt Billenstein
ma...@vazor.com
http://www.vazor.com/

Creotiv

unread,
Dec 4, 2010, 7:09:39 AM12/4/10
to gevent: coroutine-based Python network library
I don't think so. Best way to leave this as it is.
> m...@vazor.comhttp://www.vazor.com/
Reply all
Reply to author
Forward
0 new messages