On Fri, Jul 10, 2009 at 2:33 PM, Michael Bayer <[email protected]> wrote: > > Hari wrote: > > > > You are right, the problem is with the driver. I found an updated > > version and installing it fixed the problem. Thanks for helping > > resolve the problem. > > > > I was actually making sure that the GC actually returns the connection > > back, and it does work as expected. However, in the code I haven't > > seen a __del__() being implemented in _ConnectionFairy or _CursorFairy > > classes so wondering how this actually works. Am I looking at the > > correct location of code? > > it doesn't use __del__ which interferes with gc and also presents "self" > in a non-deterministic state. a remote weakref with a callback is used to > finalize connection resources back into the pool. >
In that case perhaps the docs need to be corrected? http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/pooling.html says: Both the connection proxy and the cursor proxy will also return the underlying connection to the pool after they have both been garbage collected, which is detected via the __del__() method. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
