Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
Standard_Mutex::SentryNested Class Reference

Advanced Sentry class providing convenient interface to manipulate a mutex from one thread. More...

#include <Standard_Mutex.hxx>

Public Member Functions

 SentryNested (Standard_Mutex &theMutex, Standard_Boolean doLock=Standard_True)
 Constructor - initializes the sentry object by reference to a mutex (which must be initialized). Locks the mutex immediately unless Standard_False is given as second argument.
 ~SentryNested ()
 Destructor - unlocks the mutex if already locked.
void Lock ()
 Lock the mutex.
void Unlock ()
 Unlock the mutex.

Detailed Description

As compared with simple Sentry class, provides possibility to lock and unlock mutex at any moment, and perform nested lock/unlock actions (using lock counter). However all calls must be from within the same thread; this is to be ensured by the code using this class.


Constructor & Destructor Documentation


Member Function Documentation


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