|
| uniqueLock (pMutex &p_mutex, lockPolicy policy=AUTO_LOCK) |
| Constructs a uniqueLock with specified policy.
|
|
| uniqueLock (uniqueLock &&)=delete |
| Deleted move constructor.
|
|
uniqueLock & | operator= (uniqueLock &&)=delete |
| Deleted move assignment operator.
|
|
bool | isLocked () const noexcept override |
| Checks if the lock is currently held.
|
|
void | lock () override |
| Locks the associated mutex.
|
|
bool | tryLock () override |
| Attempts to lock the associated mutex without blocking.
|
|
void | unlock () override |
| Unlocks the associated mutex.
|
|
| ~uniqueLock () override |
| Destructor - automatically unlocks 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.
|
|
RAII wrapper for single mutex locking.
Provides scoped lock management for a single pMutex with various locking policies.