DABC (Data Acquisition Backbone Core)  2.9.9
Public Member Functions | Protected Attributes
dabc::UnlockGuard Class Reference

Unlock guard for posix mutex. More...

#include <dabc/threads.h>

Public Member Functions

 UnlockGuard (const Mutex *mutex)
 ~UnlockGuard ()

Protected Attributes

pthread_mutex_t * fMutex

Detailed Description

Unlock guard for posix mutex.

reverse to function of dabc::LockGuard Idea to use in blocks like

dabc::LockGuard lock(mutex);
// do something within locked area
dabc::UnlockGuard unlock(mutex);
// here is mutex released and we could acquire other mutexes
// here mutex will be acquired again
Lock guard for posix mutex.
Definition: threads.h:127
Unlock guard for posix mutex.
Definition: threads.h:215

Definition at line 215 of file threads.h.

Constructor & Destructor Documentation

◆ UnlockGuard()

dabc::UnlockGuard::UnlockGuard ( const Mutex mutex)

Definition at line 219 of file threads.h.

◆ ~UnlockGuard()

dabc::UnlockGuard::~UnlockGuard ( )

Definition at line 223 of file threads.h.

Field Documentation

◆ fMutex

pthread_mutex_t* dabc::UnlockGuard::fMutex

Definition at line 217 of file threads.h.

The documentation for this class was generated from the following file: