Le 21/03/2012 23:54, Claudiu Saftoiu a écrit :
Hello ZODB List,


    key = ...
    print "Acquiring %s lock..." % (key,)
    print "%s lock acquired." % (key,)
    def after_commit_hook(success):
print "(after %s commit): Released %s lock" % (('failed', 'successful')[success], key)

Hum, if I understood correctly, lock acquiring is done before any change are made. So the only thing I would have done here is to have a transaction.begin() after lock.acquire. So you know the other transaction is committed and you won't have any conflict in you new transaction.

Does it helps ?


Alexandre Garel
06 78 33 15 37

For more information about ZODB, see http://zodb.org/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to