In the first case you're reading from wr and writing to wr without synchronization. If wr is a scalar (for
example, a double or an int), the program has undefined behavior, anything can happen. If it's a class object, there are two equally correct possible outcomes.
Your second code sample is well-defined and thus can be reasoned about.