#include <hxthread.hpp>
hxunique_lock - std::unique_lock style RAII-style unique lock for hxmutex.
Locks the mutex on construction and unlocks on destruction.
◆ hxunique_lock()
| hxunique_lock::hxunique_lock |
( |
hxmutex & | mtx_, |
|
|
bool | defer_lock_ = false ) |
|
inline |
Constructs with an option to defer locking.
- defer_lock : If true, does not lock the mutex immediately.
◆ ~hxunique_lock()
| hxunique_lock::~hxunique_lock |
( |
void | | ) |
|
|
inline |
Unlocks the mutex if owned.
◆ lock()
| void hxunique_lock::lock |
( |
void | | ) |
|
|
inline |
Locks the mutex if not already locked.
◆ mutex()
| hxmutex & hxunique_lock::mutex |
( |
void | | ) |
|
|
inline |
Returns a reference to the associated mutex.
◆ owns_lock()
| bool hxunique_lock::owns_lock |
( |
void | | ) |
const |
|
inline |
Returns true if the lock owns the mutex.
◆ unlock()
| void hxunique_lock::unlock |
( |
void | | ) |
|
|
inline |
Unlocks the mutex if owned.
The documentation for this class was generated from the following file: