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