Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : Marcin 'Qrczak' Kowalczyk Date : Wed Feb 09 2005 05:41 pm Giancarlo Niccolai writes: >> Please be specific. Demonstrate the problem, otherwise this is not >> credible. > > I have demonstrated it. See the other replies to Marcin. You have tried, but your example works with the proposed semantics. > An that is only ONE class of problems that can get worse with > mutexes. As for now, we have seen ZERO. > Also, the option of creating a mutex for each signle static > initializer is not viable, as mutexes are often precious resources > you want to be in control of. pthread_once_t in glibc/nptl is just an int. It has no associated resources when no thread is currently initializing the protected variable. > Or, if you don't, I want, so i restate my initial statement: do you > want this thing? then have it optional. It's harmless for those who don't make use of it. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ .