Re: [pysqlite] Concurrency - first steps

"Hugh Gibson" <hgibson-CVW/MsmY5bNaa/[email protected]> Wed, 19 Nov 2008 10:42 +0000 (GMT Standard Time)
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
> Depending on how you use it, threading.local (at least in current
> versions of python) can leak references if you use it for storing
> objects (like pysqlite Connection objects) whose deallocation may
> release the GIL. We ran into this; see 
> http://bugs.python.org/issue3710
> and http://bugs.python.org/issue1868 for more discussion.

Thanks for the heads up.

I think we're OK - each thread stores a dict of multiple PySQLite
connection objects, one for each database opened in the thread. The dict
is never removed, though entries within it are created and del'ed.

Hugh