[Twisted-Python] 2 questions: adbapi.ConnectionPool ; Defer.DeferredSemaphore , threads.deferToThread
dave at krondo.com
Fri Sep 15 00:39:44 EDT 2006
Jonathan Vanasco wrote:
> can someone clarify adbapi.ConnectionPool for me?
> i'm specifically wondering if connect/disconnect returns a handle
> to the pool and it the pool blocks until a handle is ready. i think
> it probably doesn't work that way. but i feel the need to check.
I can only answer your first question. Connect/disconnect are blocking
functions and are generally only called from the connection pool itself.
User code generally only needs to call runInteraction, runQuery, or
runOperation, and the pool will make connections as needed.
More information about the Twisted-Python