[ZODB-Dev] Deadlock in ZODB/DB.py?
Tim Peters
tim.peters at gmail.com
Mon Oct 9 11:39:38 EDT 2006
[Christian Zagrodnick]
> the DB.open method makes me wonder how it works (http://svn.zope.org/
> ZODB/trunk/src/ZODB/DB.py?rev=69551&view=auto)
>
> It locks with self._a() and calls self._connectionMap which locks
> too. I cannot imagine a way this could possibly work.
Look at __init__():
x = threading.RLock()
self._a = x.acquire
self._r = x.release
That is, it's a reentrant lock. See the Python docs for RLock().
> I guess the lock should be released before the _connectionMap call?
No.
> Interestingly both all the tests pass and ZODB works...
That was a good clue ;-)
More information about the ZODB-Dev
mailing list