Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : Marcin 'Qrczak' Kowalczyk Date : Sat Feb 05 2005 02:53 am Giancarlo Niccolai writes: > But if I add a mutex for static initializers at Consumer c and at > Producer p points, the constructor of the consumer will still not be > exited when it will wait for p to receive the initialization data, > blocking on MAX_SIZE. But P can't go, as it is locked waiting for > the construction of C to release the static initializer mutex. No, P doesn't wait for the construction of C. Each function has a separate static initializer mutex. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ .