Subj : Re: [.NET] Volatile Fields [correction] To : comp.programming.threads From : Cool Guy Date : Mon Sep 19 2005 07:47 pm Chris Thomasson <_no_spam_cristom@no_spam_comcast._net> wrote: >> So it's impossible to make such code thread-safe, then? > > This should do it for x86: > > Processor 1: Y = 1; L = 1; > Processor 2: if (L == 1) { Z = 1; L = 2; } > Processor 3: if (L == 2) { assert(Y == 1); } So this is only when three processors are involved, right? .