Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : Giancarlo Niccolai Date : Wed Feb 09 2005 04:53 pm Gianni Mariani wrote: > Giancarlo Niccolai wrote: >> Gianni Mariani wrote: > ... >>>Stick to facts. >>> >>>My proposal solves the problem of static locals being initialized in a >>>generic way - period -. >> >> >> No, it doesn't. Period. >> >> Mutexing a static initializer won't make it safe in MT. It solves a class >> of problems which has been already solved with programming patters. It >> does not solve all the problems, and make some other problem to arise. >> THIS is the simple fact, and not an opinion. > > Please be specific. Demonstrate the problem, otherwise this is not > credible. I have demonstrated it. See the other replies to Marcin. An that is only ONE class of problems that can get worse with mutexes. 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. Or, if you don't, I want, so i restate my initial statement: do you want this thing? then have it optional. Bests, Gian. .