Threads modify "global" variable -- asking for trouble?

J Rice rice.jeffrey at gmail.com
Thu Mar 16 23:06:00 EST 2006


My apologizes, I missed the newish FAQ entry on this.  The addrbl()
method looks like this:

 def addRBL(self, testname, result, info=""):
        self.testresultsRBL[testname] = result, info

So according to the FAQ, D[x] = y, where D is a dictionary, is atomic
and therefore thread-safe.  Right?




More information about the Python-list mailing list