|
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.
|
Private Attributes |
Standard_Mutex & | myMutex |
Standard_Boolean | nbLocked |
| Note that we do not protect this field from concurrent access, as it should always be accessed from within one thread, i.e. synchronously.
|