|
BDE 4.39.x Production Release
|
#include <bslmt_testutil.h>
This class defines an object that provides exclusive access to the critical sections defined by this component's macros. Multiple Guard objects can exist at once, but only in the same thread – if an attempt is made to construct a Guard while any Guards exist in other threads, the constructor will block until all Guard objects in other threads are destroyed.
Guard object is anywhere but on the stack.See bslmt_testutil
Public Types | |
| typedef UnspecifiedBool::BoolType | BoolType |
Public Member Functions | |
| TestUtil_Guard () | |
| ~TestUtil_Guard () | |
| void | operator= (bool rhs) |
| operator BoolType () const | |
|
inline |
Create a guard that locks the mutex in the singleton and saves the address of the singleton mutex.
|
inline |
Unlock the recursive mutex that was locked by the constructor.
|
inline |
Return the boolean state of this TestUtil_Guard object.
|
inline |
Set the boolean state of this object to the specified rhs.