Subj : Re: Boost.Threads on its way to C++0x To : comp.programming.threads From : Ben Hutchings Date : Fri Apr 29 2005 02:08 am Peter Dimov wrote: > gottlobfrege@gmail.com wrote: >> - a static_local template: >> >> int func() >> { >> // this thread-safely inits foo only once >> static static_local foo(foo_param1, foo_param2,...); > > How do you solve the race condition WRT the hidden compiler-generated > boolean flag? You fix it in at the language level. Hans Boehm reported that "[t]here appeared to be consensus among those attending the last C++ standards meeting that both [synchronised and unsychronised] options should be provided to the programmer" . -- Ben Hutchings Horngren's Observation: Among economists, the real world is often a special case. .