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
| Standard_Mutex::SentryNested::~SentryNested |
( |
| ) |
[inline] |
Member Function Documentation
| void Standard_Mutex::SentryNested::Lock |
( |
| ) |
[inline] |
| void Standard_Mutex::SentryNested::Unlock |
( |
| ) |
[inline] |
The documentation for this class was generated from the following file: