Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : Gianni Mariani Date : Wed Jan 19 2005 10:50 pm roland wrote: > Alexander Terekhov wrote: > >> "You should not pay for what you don't use" motto, you know. > > > A very simple (yet standard conforming) solution would be to simply > do away with the initialization on first entry to the function. > The MT version simply could initialize local statics the same way it > does with globals, at the process startup, before main. > > And this won't cost much. This won't work too well with non-trivial constructors. .