The object that 'lock accesses' CriticalSection object.
More...
The object that 'lock accesses' CriticalSection object.
- Usually created and used as a local variable.
- When this object is destroyed, it automatically unlocks the critical section that was locked by this.
Proud::CriticalSectionLock::CriticalSectionLock |
( |
CriticalSection & |
cs, |
|
|
bool |
initialLock |
|
) |
| |
|
inline |
It is possible to directly lock the critical section object at constructor.
- Parameters
-
cs | The critical section object to use |
initialLock | If it is true then the constructor immediately locks it. |
Proud::CriticalSectionLock::CriticalSectionLock |
( |
| ) |
|
|
inline |
This is constructor that using set critical section later.
Proud::CriticalSectionLock::~CriticalSectionLock |
( |
| ) |
|
|
inline |
Destructor
- If there is a Critical Section occupied by this object then it automatically relieves.
int Proud::CriticalSectionLock::GetRecursionCount |
( |
| ) |
|
|
inline |
Inquire the time that the lock is over
bool Proud::CriticalSectionLock::IsLocked |
( |
| ) |
const |
|
inline |
void Proud::CriticalSectionLock::Lock |
( |
| ) |
|
|
inline |
This occupies the critical section.
bool Proud::CriticalSectionLock::TryLock |
( |
| ) |
|
|
inline |
void Proud::CriticalSectionLock::Unlock |
( |
| ) |
|
|
inline |
This relieves occupied critical section.