> Of course i may write time.sleep( SLEEP_CONSTANT ) before
> app._p_jar.sync(), but is this a good solution?
I can't make time to understand your problem (sorry!), but I can make time
to tell you that a bare time.sleep() is almost never a good solution to
thread problems. time.sleep() in a _loop_ can be reliable, provided you can
write code to recognize when what you're waiting for has happened; this
approach is called "polling".
while what I'm waiting for hasn't happened:
For example, when you change a persistent object, its ._p_changed attribute
gets set to a true value. When the change gets committed, ._p_changed is
reset to a false value. So _perhaps_ (I'm not sure -- being sure would
require understanding all of your problem) you could poll waiting for some
specific object's _p_changed to become false.
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org