SCIRun
5.0
|
#include <Guard.h>
Public Types | |
enum | Which { Read, Write } |
Public Member Functions | |
Guard (Mutex *mutex) | |
Guard (RecursiveMutex *rmutex) | |
Guard (CrowdMonitor *crowdMonitor, Which action) | |
~Guard () | |
Release the lock acquired by the constructor. More... | |
enum Which |
Guard | ( | RecursiveMutex * | rmutex | ) |
Guard | ( | CrowdMonitor * | crowdMonitor, |
Which | action | ||
) |
Attach the Guard to the CrowdMonitor and acquire one of the locks. If action is Guard::Read, the read lock will be acquired, and if action is Write, then the write lock will be acquired. The appropriate lock will then be released by the destructor
~Guard | ( | ) |
Release the lock acquired by the constructor.