SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
Guard Class Reference

#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...
 

Member Enumeration Documentation

enum Which
Enumerator
Read 
Write 

Constructor & Destructor Documentation

Guard ( Mutex mutex)

Attach the Guard object to the mutex, and acquire the mutex.

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.


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