Subj : Re: Memory Barriers, Compiler Optimizations, etc. To : comp.programming.threads From : Scott Meyers Date : Sat Feb 05 2005 09:12 am On Fri, 4 Feb 2005 22:08:12 -0800, SenderX wrote: > >>> How do you ensure that the compiler doesn't invert the order of those > > assignments? > > Now the compiler doesn't even have a chance to reorder anything. In other words, you prevent the reordering of the assignments by not making the assignments :-) Scott .