Le mardi 02 février 2010 à 01:08 -0800, Eyal Gordon a écrit : > Hello, > > I'm running sqlalchemy on python 2.4.3, with postgresql. My > application is multi-threaded, commits and queries are protected by a > python thread lock. I suspect that when running session.commit(), the > python global interpreter lock (GIL) remains owned by this thread > until the commit completes, such that other threads can not run until > the commit action completes (even thread that have nothing to do with > the database).
Touching any Python object requires holding the GIL. The GIL can only be released when issueing a query to the database (that query can be "COMMIT" of course), which I suppose the various database drivers already do (if they don't, you can certainly issue a bug/feature request to them). Antoine. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.