A common question about threads is: “I need a read/write
access to a variable from two or more threads. Should I protect an
access to a variable by critical section?” A simple answer is: yes, if you want to be on the safe side always protect the variable by a critical section. A deeper answer ...
More...