[Zope-dev] Re: [Zope] Question about ZODB and threads

Pavlos Christoforou pavlos@gaaros.msrc.sunysb.edu
Fri, 15 Oct 1999 12:55:05 -0400 (EDT)


On Fri, 15 Oct 1999, Martijn Pieters wrote:

> This won't solve your problem. Either you manage to convince the ZODB that 
> your object is still clean, and won't get stored (no access for other 
> threads), or if you tell the ZODB it is dirty, you get stored _including_ 
> your dict, and you create another transaction for the instance.

You are right ... Silly of me to think I could have both

> How about creating a module level instance of a MemoryStorage ZODB for your 
> product's use? Any instance of your product can call a method in the module 
> that'll return a new connection to the storage, and store that into a _v_ 
> variable. That way any thread safety is taken care of by your product ZODB. 
> You'll only have to code for the ConflictError exception.
> 

Hmmm not a bad idea. Let me think about it some more.

Thanks again Martijn


Pavlos