![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archive"RuntimeError: dictionary changed size during iteration" ; Good atomic copy operations?
From: robert <no-spam@no-spam-no-spam.com>
Date: Sat Mar 11 2006 - 12:19:49 CET
In very rare cases a program crashes (hard to reproduce) :
* several threads work on an object tree with dict's etc. in it. Items
* one thread periodically pickle-dumps the tree to a file:
"RuntimeError: dictionary changed size during iteration" is raised by
What can I do about this to get a stable pickle-dump without risiking
Is a copy.deepcopy ( -> "cPickle.dump(copy.deepcopy(obj),f)" ) an
Or can I only retry several times in case of RuntimeError? (which would
Robert
PS: Zope dumps thread exposed data structes regularly. How does the ZODB
--- Python 2.4.1 (#2, May 5 2005, 11:32:06) [GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2Received on Sun Apr 30 11:33:31 2006 |