Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : David Schwartz Date : Sat Feb 12 2005 03:09 pm "Giancarlo Niccolai" wrote in message news:95e4efda.0502121051.28c5ec0c@posting.google.com... > The fact is that a COFU would work in that case. But a static > initializer instead of a COFU would not, that was the point of "change > it with any static initializer method". The point is that a static > initializer would require lock while checking for the item to have > been already created, and that's where the deadlock with the reentrant > mutex happens. I cannot imagine how that could conceivably be possible. If the COFU is already intialized, the initializer code reduces to this: acquire_mutex(); release_mutex(); How can that deadlock with anything? DS .