RecursiveMutex offers exclusive, recursive ownership semantics: More...
#include <yarp/os/RecursiveMutex.h>
Classes | |
class | Private |
Public Member Functions | |
RecursiveMutex () | |
Constructor. More... | |
~RecursiveMutex () | |
Destructor. More... | |
void | lock () |
Lock the associated resource, waiting if the resource is busy. More... | |
bool | try_lock () |
Lock the associated resource if it is free. More... | |
void | unlock () |
Unlock the associated resource thus freeing waiting threads. More... | |
bool | tryLock () |
Lock the associated resource if it is free. More... | |
RecursiveMutex offers exclusive, recursive ownership semantics:
std::recursive_mutex
instead. Definition at line 40 of file RecursiveMutex.h.
RecursiveMutex::RecursiveMutex | ( | ) |
Constructor.
Definition at line 20 of file RecursiveMutex.cpp.
RecursiveMutex::~RecursiveMutex | ( | ) |
Destructor.
Definition at line 25 of file RecursiveMutex.cpp.
void RecursiveMutex::lock | ( | ) |
Lock the associated resource, waiting if the resource is busy.
If the thread which is currently owning the resource calls this function, it will not block, and a reference count will be increased Thu number of calls to lock() must be balanced by the same number of calls to unlock()
Definition at line 30 of file RecursiveMutex.cpp.
bool RecursiveMutex::try_lock | ( | ) |
Lock the associated resource if it is free.
Definition at line 35 of file RecursiveMutex.cpp.
bool RecursiveMutex::tryLock | ( | ) |
Lock the associated resource if it is free.
try_lock()
instead. Definition at line 45 of file RecursiveMutex.cpp.
void RecursiveMutex::unlock | ( | ) |
Unlock the associated resource thus freeing waiting threads.
If the resource is not currently locked by the calling thread, the behavior is undefined.
Definition at line 40 of file RecursiveMutex.cpp.