On Apr 9, 2007, at 5:18 AM, Koen Bok wrote:

>
> We are building a GUI app, and we were thinking about wrapping
> session.flush() in a thread with a timer that detects a timeout. That
> way we would have better performace and we can generate warnings if
> the connection goes down. Do you guys think this is smart, or are
> there complications?
>

we have logic for invalidating connections that have disconnected in  
the trunk, but it relies upon the DBAPI throwing exceptions.   
session.flush() is a very high level place to put connection timeout  
checking,  also what about selects/queries ?

> I tried to build this already but I cannot figure out how to assign
> the shared connection to a thread. I always get 'No connection
> defined'.

if youre on py2.4 check out threading.local().


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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