Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : Giancarlo Niccolai Date : Thu Feb 03 2005 09:53 pm Gianni Mariani wrote: > Giancarlo Niccolai wrote: > ... >> >> Having a reentrant mutex cheching for each initializer initialization 1) >> does not fix the generic problem of initialization during static init >> with MT already going and 2) would be ... crappy. > > Why ? Honestly, why would this not solve the problem generically ? Because MUTEXING is not the heart of multithreading!!! You can mutex each and every single access to any variable, even from the stack, in all your program and still have thread unsafe code!!! Mutexing the things up won't make your code SAFE. It may make it a little bit safer in some cases, but mutexing, although sometimes necessary, is rarely enough except in academic cases. Giancarlo. .