now writing complicated class
and felt that I use to much CRITICAL_SECTION
.
As far as I know there are atomic operations for some types, th
Here this can be found:
Simple reads and writes to properly aligned 64-bit variables are atomic on 64-bit Windows. Reads and writes to 64-bit values are not guaranteed to be atomic on 32-bit Windows. Reads and writes to variables of other sizes are not guaranteed to be atomic on any platform.
Result should be correct but in programming it is better not to trust should. There still remains small possibility of failure because of CPU cache.