Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : Marcin 'Qrczak' Kowalczyk Date : Wed Feb 09 2005 09:48 pm "David Schwartz" writes: > IMO, the best way to do this would be with a new language keyword. The > keyword should simply specify that a particular static be initialized at > startup, rather than lazily. This has the advantage of removing overhead > rather than adding it. You don't need a keyword for that - just move the variable outside a function. This has a different problem: uncertainty about relative order of initialization of variables from different files. Lazy initialization has other merits besides skipping the initialization if the variable is not needed at all. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ .