uh... in some link I checked long ago, multi-threading seems to be his
favorite topic.
to make it short, on x86 (pentium, AMD, ..) you will never have this
problem.
but on processor such as.. uh.. other architecture the memory itself is in a
per processor cache and volatile only guarantee (IIRC) that you read/write
to this processor local cache. so the value would be shared by multiple
thread on the same processor, but not by multiple thread on multiple
processor.
not to mention there are multiple level of such cache memory.
however, don't worry, this doesn't apply to Pentium or AMD, even
multi-core/multi-processor one.
But worry that volatile write are not atomic for value bigger than a
register, in which case a lock is more appropriate.