Subj : Re: Memory visibility and MS Interlocked instructions To : comp.programming.threads From : John Hickin Date : Thu Aug 25 2005 03:14 pm "David Schwartz" wrote in message news:del00d$vps$1@nntp.webmaster.com... > > > This is a disaster on a machine with more than 2 CPUs or > hyper-threading. In the more than 2 CPUs case, two CPUs in the 'while' loop > will totally saturate the FSB, causing the CPU that needs to release the > lock to be unable to do so. In the hyper-threaded case, the virtual CPU in > the while loop will steal resources from the thread that's doing useful > work. So I was correct about falling into a trap :-) Regards, John. .