Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : Giancarlo Niccolai Date : Wed Feb 02 2005 03:53 pm Joseph Seigh wrote: >> The reason I think this may work is that the value of x_Name is >> idempotent and the only thing the lock is doing is to have threads wait >> for the initialization. >> > Missing read memory barrier to ensure reads of data occur > after read of pointer to data. Also write memory barrier > to ensure writes of data occur before write of pointer. > The lock doesn't solve either of those problems. > > There's a couple of solutions to this but I don't have all the > urls instantly on hand like Alexander seems to have. > I agree; also, if this crap makes its way into GCC, I will stop using it. Giancarlo. .