Original Post
Normally I know you would want to use synchronization objects like a mutex, or critical section if you need a variable modified by two or more threads, but is it ALWAYS necessary?
If I have a simple integer variable that will be incremented periodically by different threads, is it really necessary to protect the variable with a synchronization object even if I have no conditionals depending on the variable's value (I'm using it purely for informational purposes)?
In other words, is it possible two threads could 'corrupt' the value by accessing it simultaneously, or (since it is a simple increment) will it be ok?
[edited by - SpaceRogue on July 17, 2003 11:19:35 PM]