Basic wrapper for mutual exclusion. More...
#include <yarp/os/Mutex.h>
Classes | |
| class | Private |
Public Member Functions | |
| Mutex () | |
| Constructor. More... | |
| ~Mutex () | |
| Destructor. More... | |
| void | lock () |
| Lock the associated resource, waiting if necessary. More... | |
| bool | try_lock () |
| Lock the associated resource if possible. More... | |
| void | unlock () |
| Unlock the associated resource. More... | |
| bool | tryLock () |
| Lock the associated resource if possible. More... | |
Basic wrapper for mutual exclusion.
Intended to match std::mutex in C++11, for eventual replacement by that class.
std::mutex instead. | void Mutex::lock | ( | ) |
| bool Mutex::try_lock | ( | ) |
| bool Mutex::tryLock | ( | ) |
Lock the associated resource if possible.
Don't wait. Behavior is undefined if called by the thread currently locking the resource.
| void Mutex::unlock | ( | ) |