class used to protect shared data from being simultaneously accessed by multiple threads.
More...
#include <mutex.hpp>
|
| | Mutex () |
| | default constructor.
|
| |
| | Mutex (const Mutex &other)=delete |
| | copy constructor.
|
| |
| Mutex & | operator= (const Mutex &other)=delete |
| | copy assignment.
|
| |
| | Mutex (Mutex &&other)=delete |
| | move constructor.
|
| |
| Mutex & | operator= (Mutex &&other)=delete |
| | move assignment.
|
| |
| | ~Mutex () |
| | destroys the mutex object.
|
| |
| void | lock () noexcept |
| | lock the mutex.
|
| |
| bool | tryLock () noexcept |
| | lock the mutex or return immediatly if the mutex is already locked.
|
| |
| void | unlock () noexcept |
| | unlock the mutex.
|
| |
| pthread_mutex_t * | handle () noexcept |
| | get native handle.
|
| |
class used to protect shared data from being simultaneously accessed by multiple threads.
◆ Mutex() [1/3]
◆ Mutex() [2/3]
| join::Mutex::Mutex |
( |
const Mutex & | other | ) |
|
|
delete |
copy constructor.
- Parameters
-
| other | other object to copy. |
◆ Mutex() [3/3]
| join::Mutex::Mutex |
( |
Mutex && | other | ) |
|
|
delete |
move constructor.
- Parameters
-
| other | other object to move. |
◆ ~Mutex()
destroys the mutex object.
◆ handle()
| pthread_mutex_t * Mutex::handle |
( |
| ) |
|
|
noexcept |
get native handle.
- Returns
- native handle.
◆ lock()
◆ operator=() [1/2]
| Mutex & join::Mutex::operator= |
( |
const Mutex & | other | ) |
|
|
delete |
copy assignment.
- Parameters
-
| other | other object to copy. |
- Returns
- a reference to the current object.
◆ operator=() [2/2]
move assignment.
- Parameters
-
| other | other object to move. |
- Returns
- a reference to the current object.
◆ tryLock()
lock the mutex or return immediatly if the mutex is already locked.
- Returns
- true if locked, false otherwise.
◆ unlock()
The documentation for this class was generated from the following files: