Non-recursive mutex.
More...
#include <StormByte/safe/mutex.hxx>
Non-recursive mutex.
The gate lives on Base's heap.
Not an alias of std::mutex. Not copyable or movable. unlock without ownership is undefined.
◆ Mutex() [1/3]
| StormByte::Safe::Mutex::Mutex |
( |
| ) |
|
Unlocked mutex.
- Exceptions
-
◆ Mutex() [2/3]
| StormByte::Safe::Mutex::Mutex |
( |
const Mutex & | | ) |
|
|
delete |
◆ Mutex() [3/3]
| StormByte::Safe::Mutex::Mutex |
( |
Mutex && | | ) |
|
|
delete |
◆ ~Mutex()
| StormByte::Safe::Mutex::~Mutex |
( |
| ) |
|
|
noexcept |
Destroys the gate on Base's heap.
- Note
- The owner unlocks before destruction.
◆ lock()
| void StormByte::Safe::Mutex::lock |
( |
| ) |
|
Acquire the mutex.
- Exceptions
-
◆ operator=() [1/2]
| Mutex & StormByte::Safe::Mutex::operator= |
( |
const Mutex & | | ) |
|
|
delete |
◆ operator=() [2/2]
| Mutex & StormByte::Safe::Mutex::operator= |
( |
Mutex && | | ) |
|
|
delete |
◆ try_lock()
| bool StormByte::Safe::Mutex::try_lock |
( |
| ) |
|
|
noexcept |
Try to acquire the mutex.
- Returns
- Whether this thread now owns it.
◆ unlock()
| void StormByte::Safe::Mutex::unlock |
( |
| ) |
|
|
noexcept |
Release the mutex.
- Precondition
- The calling thread owns it.
◆ ConditionVariable
| friend class ConditionVariable |
|
friend |
The documentation for this class was generated from the following file: