4f0 Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : gniccolai Date : Sat Feb 19 2005 04:26 am Marcin 'Qrczak' Kowalczyk wrote in message news:<87acq3h3vd.fsf@qrnik.zagroda>... > gniccolai@yahoo.com (Giancarlo Niccolai) writes: > > > If a program waits on an automatically inserted mutex, this means that > the initialization of a static local is in progress (because the mutex > is locked only during such initialization) and that a thread tries to > execute this definition again. This is prohibited by current C++, you > may not enter initialization of a static local before its brevious > initialization has completed, the program is already broken. I can try to access any variable from any thread in any moment, in C, in C++, or in any language, and there's nothing in the C++ or posix standards preventing me from doing it. The fact that its initialization may be or may be not already complete is MINE problem, not the compiler's, not the standard's, but mine alone. And I can assure, I can manage it, safely and mathematecally. Your talking is plainly nonsense, and this is evident that you don't know enough about both threading and C++. Gian. . 0