[ZODB-Dev] ConflictErrors won't clear
Jeremy Hylton
jhylton at gmail.com
Fri Apr 15 10:54:32 EDT 2005
On 4/15/05, Chris Withers <chris at simplistix.co.uk> wrote:
> > Short course: A ZEO client needs to run an asyncore mainloop if it wants to
> > get invalidations processed "by magic". Alternatives include calling
> > sync(), or closing and (re)opening the connection, at appropriate times.
>
> Hurm, this really should be in bright flashing neon somewhere. I the 5
> years this process has been used, I've never known that ZEO don't work
> right when there's no asyncore loop :-(
It's mentioned in the documentation -- see section 3.4 ZEO programming
notes -- and it's been discussed on this list many, many times.
It sounds like the simplest approach for your application is to do
like Zope and start a separate thread that runs an asyncore mainloop.
Then your application threads will see updates when the commit and
abort transactions, just like the would in Zope.
Jeremy
More information about the ZODB-Dev
mailing list