Subj : Re: [.NET] Volatile Fields [correction] To : comp.programming.threads From : David Hopwood Date : Mon Sep 19 2005 03:35 pm Oops, wrong example. This is the example I meant: Strictly speaking, though, adding memory barriers is not always sufficient to simulate sequentially consistent behaviour. For instance, you might think that in this example: Start with Y == Z == 0. Processor 1: Y = 1; Processor 2: if (Y == 1) { Z = 1; } Processor 3: if (Z == 1) { assert(Y == 1); } the assert cannot fail (because Z = 1 can only happen after Y = 1). But in some memory models, including the model used by x86 (as far as it's possible to tell from the documentation), and probably also the one used by .NET, it *is* possible for the assert to fail. This can happen no matter what memory barriers are added, and even if Y and Z are volatile in the case of .NET. -- David Hopwood .