Global Threading Lock 2 - Re: "RuntimeError: dictionary changedsize during iteration"..

Terry Reedy tjreedy at udel.edu
Mon Mar 13 13:41:57 EST 2006


"robert" <no-spam at no-spam-no-spam.com> wrote in message 
news:dv3up3$i0c$1 at ulysses.news.tiscali.de...

Though mostly ignorant of threading issues, I wonder if the following would 
work.  Derive a class from dict.  Define a backup method that sets and 
unsets a private self.lock.  Define setitem and delitem methods that wrap 
calls to the real methods with while self.lock: sleep(1 second).

tjr






More information about the Python-list mailing list