Thread safe lazy construction of a singleton in C++ Thread safe lazy construction of a singleton in C++ multithreading multithreading