I am not trying to "lock" anything directly. I have more than one client
writing data of the same type to the same DB simultaneously. I wish to
keep it this way, instead of doing any other tricks. If I either catch
the exception and retry, or check a semaphore, hopefully I won't spend
too much time spinning.
It sounds like you're re-inventing a lot of wheels here.
Perhaps you could re-state the higher level problem you're trying to solve?
Simplistix - Content Management, Zope & Python Consulting
Zope-DB mailing list