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

Erik Stephens samurai@ep.newtimes.com
Fri, 02 Mar 2001 09:08:03 -0700


"R. David Murray" wrote:
> 
> 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.

Thanks for the response.  If I understand you correctly, then as long a
thread does not try to modify an out-of-date object, it will not try to
re-read the most current version?  Is that the expected behaviour?

Thanks,
Erik