Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : David Hopwood Date : Sun Jan 23 2005 08:38 pm Gianni Mariani wrote: > David Hopwood wrote: > ... > >> That's not obvious. Assuming preemptive multithreading, memory barriers >> are still needed on a uniprocessor to limit compiler reordering. > > Wouldn't the volatile keyword indicate that to the compiler ? Not in general. If it does then it is only due to a coincidence of the implementation of that compiler. -- David Hopwood .