![]() |
Scanframe Modular Application 0.1.0
|
Locking class for easy locking and unlocking by destructor. More...
#include <Mutex.h>

Public Member Functions | |
| Lock (const Mutex &mutex, bool try_lock=false) | |
| Constructor. | |
| ~Lock () | |
| Destructor. | |
| bool | acquire (bool try_lock=false, const TimeSpec &timeout={}) |
| Returns true when if it was acquired. | |
| bool | release () |
| operator bool () const | |
| Returns true if the class was locked. Always true when try_lock is false. | |
Locking class for easy locking and unlocking by destructor.
|
explicit |
Constructor.
| sf::Mutex::Lock::~Lock | ( | ) |
Destructor.
| bool sf::Mutex::Lock::acquire | ( | bool | try_lock = false, |
| const TimeSpec & | timeout = {} |
||
| ) |
Returns true when if it was acquired.
|
inlineexplicit |
Returns true if the class was locked. Always true when try_lock is false.
| bool sf::Mutex::Lock::release | ( | ) |
Releases the mutex.