Template Class epicsGuardRelease
Defined in File epicsGuard.h
Class Documentation
-
template<class T>
class epicsGuardRelease RAII style unlocking of an epicsGuard object.
RAII style unlocking of an epicsGuard object This class can be used while a epicsGuard is active to temporarily release the mutex and automatically re-apply the lock when this object goes out of scope.
This class is also useful in situations where C++ exceptions are possible.
Example
epicsMutex mutex; { epicsGuard guard(mutex); printf("mutex is locked"); { epicsGuardRelease grelease(guard); printf("mutex is unlocked"); } printf("mutex is locked"); } printf("mutex is unlocked");
Public Types
-
typedef epicsGuard<T> guard_t
Public Functions
-
inline epicsGuardRelease(epicsGuard<T> &guardIn)
Constructs an epicsGuardRelease, unlocking the given epicsGuard.
Constructs an epicsGuardRelease, unlocking the given epicsGuard for the duration of this object.
- Parameters
guardIn – The epicsGuard object to be temporarily released.
-
inline ~epicsGuardRelease()
-
typedef epicsGuard<T> guard_t