[Zope-dev] How to avoid ConflictErrors ?

2001-01-28 Thread Morten W. Petersen

Hi zopers,

I'm having problems with a product I'm developing.  The product is part of the
ZopeGUM package, the GUM product.  If you have a look in gum.py in that
product, you can see a method named _retrieve_messages, which can at
times store enourmous amounts of objects and data in one transaction.

Now, if I access the GUM instance at the same time as this method is being
called, I may either get a ConflictError raised in the page, or in the
Zope debug output. 

I've read all the posts I could find regarding ConflictErrors, and they
mention that careful programming could help in avoiding these exceptions.
I'm assuming that this applies only to whenever two threads are trying
to *modify* the same object; and frankly, I can't see where I'm modifying
any objects, unless modifying one object, an rfc822_message instance in
a message_container instance also somehow modifies the message_container.

Any idea what I'm doing wrong?

Thanks  cheers,

Morten

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] How to avoid ConflictErrors ?

2001-01-28 Thread Morten W. Petersen

[Chris Withers]

| Please check that both rfc822_message and message_container subclass
| Persistence.Persistent.

They do.  *ponder*

-Morten

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )