Template Class epicsGuard
Defined in File epicsGuard.h
Class Documentation
-
template<class T>
class epicsGuard Provides an RAII style lock/unlock of a mutex.
Provides an RAII style lock/unlock of a mutex. When this object is created, it attempts to lock the mutex it was given. When control leaves the scope where this was created, the destructor unlocks the mutex.
This class is also useful in situations where C++ exceptions are possible.
Example
epicsMutex mutex; { epicsGuard guard(mutex); printf("mutex is locked") } printf("mutex is unlocked\n");
Public Types
-
typedef epicsGuardRelease<T> release_t
-
typedef epicsGuardRelease<T> release_t