"RuntimeError: dictionary changed size during iteration" ; Good atomic copy operations?

EleSSaR^ usenetpublic-elessar.xyz at yahoo.it
Sat Mar 11 21:20:48 CET 2006

robert si è profuso/a a scrivere su comp.lang.python tutte queste

> own deepcopy: thus, do you already know if the existing deepcopy has the 
> same problem as cPickle.dump ?    (as the problem araises rarely, it is 
> difficult for me to test it out)

I don't know the exact specs of your object, and I don't know what
operations are you performing on that object, nor the way they're atomic.

It seems like you're trying to save periodically the state of such object
while it is being modified (a sort of backup?), and Python complains about
that. A self-implemented deepcopy might raise anomalies (i.e. your dumped
object may be partly a 'before' object and partly an 'after' object ) as

By the way, you could try employing locks from other threads to dump the
object as well... this would prevent additional locking.
> PS: how does ZODB work with this kind of problem? I thought is uses cPickle?

I have no idea about this.

EleSSaR^ <usenetpublic-elessar.xyz at yahoo.it>
Togli .xyz dalla mia email per contattarmi.

More information about the Python-list mailing list