1#ifndef QX_THREAD_SAFE_SINGLETON_H
2#define QX_THREAD_SAFE_SINGLETON_H
6#include <QRecursiveMutex>
9#include "qx/core/qx-exclusiveaccess.h"
17template<
class Singleton,
typename Mutex = QMutex>
24 static inline constinit Mutex smMutex;
43#define QX_THREAD_SAFE_SINGLETON(...) friend ThreadSafeSingleton<__VA_ARGS__>
The ExclusiveAccess template class is a convenience class that simplifies access to resources secured...
Definition qx-exclusiveaccess.h:16
ThreadSafeSingleton()=default
static Qx::ExclusiveAccess< Singleton, QMutex > instance()
Definition qx-threadsafesingleton.h:32
Specifies that a type is one of several types.
Definition qx-concepts.h:509
The Qx namespace is the main namespace through which all non-global functionality of the Qx library i...
Definition qx-abstracterror.cpp:13
The qx-concepts header file provides a library of general purpose concepts as an extension of the sta...