A guard class that releases its resource upon creation and acquires read access to its resource upon destruction.
More...
template<class Resource>
class RWTReadUnlockGuard< Resource >
RWTReadUnlockGuard is a guard class that releases its resource upon creation and acquires read access to its resource upon destruction. Guard objects work in conjunction with block statements. The guard objects establish an appropriate state upon creation, maintain that state for the duration of the block, and restore the original state upon destruction. For example,a guard may release read access on a mutex upon creation and reacquire read access on that mutex when destructed. The class used as the template parameter Resource
must be one that provides acquireRead() and release() methods, such as the synchronization classes provided in this module.
- Example
#include <rw/sync/RWReadersWriterLock.h>
#include <rw/sync/RWTReadUnlockGuard.h>
void foo() {
{
}
}
A synchronization lock that allows concurrent access to multiple readers, but limits access to a sing...
Definition RWReadersWriterLock.h:127
A guard class that releases its resource upon creation and acquires read access to its resource upon ...
Definition RWTReadUnlockGuard.h:70
- See also
- RWTReadLockGuard, RWTTryReadLockGuard