[Zope-dev] How is memory shared between Zope threads?

R. David Murray bitz@bitdance.com
Fri, 2 Mar 2001 08:44:11 -0500 (EST)


On Thu, 1 Mar 2001, Erik Stephens wrote:
> Naively, I can think of 2 approaches: a shared memory approach or a
> separate memory per thread with notifications.  Zope behaves like each
> thread as its own copy of in-memory pieces and sometimes these
> per/thread memory blocks do not get updated.

That is correct, each thread gets its own copy of the objects.  My
understanding (from listening to this list, not from reading the code)
is that the ZODB checks when it goes to write out an object at the
end of a (sub)transaction to see whether another thread modified it,
and if so it raises a ConflictError and the entire transaction is
retried with the updated copy of the object.

--RDM