Subj : Re: [.NET] Volatile Fields To : comp.programming.threads From : David Schwartz Date : Sun Sep 18 2005 12:27 am "Cool Guy" wrote in message news:1snaf8b7q3kyf.dlg@cool.guy.abc.xyz... > But my understanding is that that there are in fact *two* (separate) > issues > here: > > a. the above; and > b. that reads may come from a cache instead of from main memory (and > that writes may go to a cache instead of to main memory). You are programming in .NET, there is no such thing as a cache. You are programming for a virtual machine, not a physical machine. The documentation says that volatile reads and writes have those semantics, and so the compiler will do whatever magic it takes to make those things work. In this case, the magic is actually done by the processors, they have cache coherency implemented in hardware. Google for 'MESI' and 'cache coherency' if you want to know how it works. DS .