![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archiveRe: "RuntimeError: dictionary changed size during iteration" ; Good atomic copy operations?
From: EleSSaR^ <usenetpublic-elessar.xyz@yahoo.it>
Date: Sun Mar 12 2006 - 04:07:44 CET
robert si è profuso/a a scrivere su comp.lang.python tutte queste
> Yes, a "backup" / autosave while all threads are running. It doesn't
But it does matter if the autosave happens *while* an item is being
>> By the way, you could try employing locks from other threads to dump the
You're never using any lock, then? Isn't it possible that two threads try
> change "subobj.x='y'" is a dictionary operation. That would make
Well... threaded programming usually is a hard task. No surprise so many
> def rt_save_dict_copy()
But with no warranty of data consistency. It will prevent new values to be
import random
print "dict before iteration:", fromd
print "copied dict:", rt_save_dict_copy()
-- EleSSaR^ <usenetpublic-elessar.xyz@yahoo.it> -- Togli .xyz dalla mia email per contattarmi.Received on Sun Apr 30 11:37:17 2006 |