17 #ifndef THRILL_COMMON_SINGLETON_HEADER 18 #define THRILL_COMMON_SINGLETON_HEADER 26 template <
typename Instance,
bool destroy_on_exit = true>
58 template <
typename Instance,
bool destroy_on_exit>
61 static std::mutex create_mutex;
62 std::unique_lock<std::mutex> lock(create_mutex);
71 template <
typename Instance,
bool destroy_on_exit>
79 template <
typename Instance,
bool destroy_on_exit>
86 #endif // !THRILL_COMMON_SINGLETON_HEADER static volatile_instance_pointer instance_
volatile instance_pointer volatile_instance_pointer
instance_type * instance_pointer
static instance_pointer CreateInstance()
static instance_pointer GetInstance()
Singleton & operator=(const Singleton &)=delete
non-copyable: delete assignment operator
static void DestroyInstance()