LibreOffice Module comphelper (master)  1
Namespaces | Functions
doublecheckedinit.hxx File Reference
#include <osl/getglobalmutex.hxx>
#include <atomic>
#include <functional>
Include dependency graph for doublecheckedinit.hxx:

Go to the source code of this file.

Namespaces

 comphelper
 

Functions

template<typename Type , typename Function = std::function<Type*()>, typename Guard = osl::MutexGuard, typename GuardCtor = osl::GetGlobalMutex>
static Typecomphelper::doubleCheckedInit (std::atomic< Type * > &pointer, Function function, GuardCtor guardCtor=osl::GetGlobalMutex())
 Thread-safe singleton creation. More...