|
| multiLock (MUTEX &... mutex) |
| Constructs a multiLock with AUTO_LOCK policy.
|
|
| multiLock (lockPolicy policy, MUTEX &... mutex) |
| Constructs a multiLock with specified policy.
|
|
bool | isLocked () const noexcept override |
| Checks if all mutexes are currently locked.
|
|
void | lock () override |
| Locks all managed mutexes.
|
|
bool | tryLock () override |
| Attempts to lock all managed mutexes without blocking.
|
|
void | unlock () override |
| Unlocks all managed mutexes.
|
|
| multiLock (multiLock &&)=delete |
| Deleted move constructor.
|
|
multiLock & | operator= (multiLock &&)=delete |
| Deleted move assignment operator.
|
|
| ~multiLock () override |
| Destructor - automatically unlocks all if locked.
|
|
| lockGuard ()=default |
| Default constructor.
|
|
| lockGuard (const lockGuard &)=delete |
| Deleted copy constructor.
|
|
lockGuard & | operator= (const lockGuard &)=delete |
| Deleted copy assignment operator.
|
|
virtual | ~lockGuard ()=default |
| Virtual destructor.
|
|
|
enum class | lockPolicy { MANUAL_LOCK
, AUTO_LOCK
, TRY_LOCK
, ADOPT_LOCK
} |
| Locking policies for guard construction. More...
|
|
static constexpr auto | MANUAL_LOCK = lockPolicy::MANUAL_LOCK |
| Constant for manual lock policy.
|
|
static constexpr auto | AUTO_LOCK = lockPolicy::AUTO_LOCK |
| Constant for automatic lock policy.
|
|
static constexpr auto | TRY_LOCK = lockPolicy::TRY_LOCK |
| Constant for try-lock policy.
|
|
static constexpr auto | ADOPT_LOCK = lockPolicy::ADOPT_LOCK |
| Constant for adopt lock policy.
|
|
template<typename... MUTEX>
class original::multiLock< MUTEX >
RAII wrapper for multiple mutex locking.
- Template Parameters
-
MUTEX | Variadic template parameter pack for mutex types |
Provides scoped lock management for multiple mutexes with deadlock avoidance and various locking policies.