Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : SenderX Date : Fri Jan 21 2005 01:18 pm > > 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 ? The AppCore library "only" uses volatile for source documentation. All variables prefixed with the volatile keyword are considered shared. Volatile is basically useless wrt threads and/or memory visibility... One note: Using volatile "may or may not" reduce performance for all algorithms that use them. Some compilers may ( I think ) actually implement volatile variable access with memory barriers. Iitanic ABI? .