This has been fixed in C++11. In fact, there are several alternatives. <atomic> provides sequential consistency by default, preventing the seemingly-bizarre operation reorderings described here. std::call_once() does exactly what it says: it allows multiple threads to call something exactly once (with robust behavior in the face of exceptions). And the magic statics feature in the Core Language makes the construction and destruction of function-local statics thread-safe (protecting actual usage is up to you).