[ZODB-Dev] Thread Safety, Reaimed
Norfleet, Sheppard S.
sheppard.norfleet at ngc.com
Thu Aug 7 08:46:16 EDT 2003
I am unable to send an email to the person this message was meant for, so I
am wondering if anyone else can help me. I recognize this might be outside
the bounds of the ZODB mail list, but this is where the thread was started.
so...
I am making a application level replication product for my company, and the
product spawns a daemon thread to look for incoming transactions. I have
gotten rid of all my database conflict errors and tested concurrency locks
pretty rigorously. The daemon thread opens its own database connection and
creates a new context for the product, and any change to the product is
fully bracketed by a python RLock.
I say its thread safe, but actually after a period of time it stops being
so. Since the original presentation thread has joined, I am wondering that
when another presention thread is created that references the product, that
Zope is creating a whole new RLock. If this is the case, how would I go
about creating a singleton RLock object?
I was thinking I could modify the Zope code and store my lock in an object
that is always available and never dies till Zope dies. Is that object the
application object? I realize its an ugly solution, but it would work.
More information about the ZODB-Dev
mailing list