On Apr 27, 2008, at 2:55 AM, Esceo wrote:

>
> Just a side note, is the pool code thread safe?
> i.e. no two threads would possibly checkout the same connection at any
> point in time?

we're pretty confident its completely threadsafe as of 0.3.11, we have  
several different kinds of tests for its thread-safety now and we  
havent heard of anyone having these kinds of issues on the "thread- 
sensitive" DBAPIs like MySQLDB in a long time.

What my suspicion here is, is that the connection is being returned to  
the pool and properly being checked out elsewhere (even in the same  
thread), but theres a cursor still opened somewhere.  As I've  
mentioned, we removed the "check for any remaining open cursors" logic  
a while back since its not needed in most cases, since the ResultProxy  
automatically closes cursors in all cases except when SELECT results  
are pending (and in that case the end-user should be closing the  
result set or fetching all results) - in that case, the cursor still  
gets closed when the resultproxy is garbage collected but garbage  
collection is not always immediate, even with an object such as RP  
which intentionally does not have circular references for this reason.

What I'm not sure of at this point is if theres some cursor usage  
specific to the MS-SQL dialect that might be external to the  
ResultProxy....if Rick could comb through that for me that would be  
helpful.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to