20 Nov
2006
20 Nov
'06
7:02 p.m.
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