[Zope] Persistent object in volatile dictionary on a per thread
basis
Dieter Maurer
dieter at handshake.de
Mon Nov 20 14:02:02 EST 2006
Marco Bizzarri wrote at 2006-11-20 11:06 +0100:
>I would like to know if it can be considered safe to keep an object in
>a volatile (i.e. non persistent) dictionary, one for each thread.
You can keep objects in a volatile dictionary -- but they must
not be persistent (unlike you put them into a "_v_*" variable.
A persistent object can only be used in the context of the
ZODB connection that loaded it.
>....
>exceptions.RuntimeError
>Shouldn't load state for 0x01254260 when the connection is closed
That's one of the possible problems when you violate the above
restriction.
--
Dieter
More information about the Zope
mailing list