CARMA C++
|
A scope class (i.e. More...
#include <carma/util/ScopedPthreadMutexLock.h>
Public Member Functions | |
ScopedPthreadMutexLock (PthreadMutex &mutex) | |
Obtains a lock on the given mutex for the caller's thread (possibly waiting an indeterminate amount of time along the way). More... | |
~ScopedPthreadMutexLock () | |
Releases the lock on the mutex (that was given to the constructor) held by the caller's thread. More... | |
A scope class (i.e.
a class that does or manages something for the lifetime of the instance) that makes simple PthreadMutex lock management easier in a C++ world.
If your locking needs are not so simple then ScopedPthreadMutexLockManager might be what you need. Usage might look something like this:
Definition at line 31 of file ScopedPthreadMutexLock.h.
|
explicit |
Obtains a lock on the given mutex for the caller's thread (possibly waiting an indeterminate amount of time along the way).
mutex | The mutex to to wait for a lock on |
Definition at line 64 of file ScopedPthreadMutexLock.h.
carma::util::ScopedPthreadMutexLock::~ScopedPthreadMutexLock | ( | ) |
Releases the lock on the mutex (that was given to the constructor) held by the caller's thread.
Definition at line 72 of file ScopedPthreadMutexLock.h.