Hi,if I have a class A that contains a boolean variable named x, is it safe to read and change it from different threads without using locks? Is it guaranteed that A.x will be always True or False, and not any other weird value that that causes it to be inconsistent (assuming I only set it to True or False) ?
I have a = A() first thread does: if a.x is True : pass 2nd thread does: a.x = False is it safe? and what if x was a dict ? especially if the only values that are set in the dictionary are simple: booleans, integers, floats, strings
-- http://mail.python.org/mailman/listinfo/python-list