
Public Member Functions | |
| CWhileInCS (TMCCriticalSection *theCS) | |
| ~CWhileInCS () | |
| void | Clean () |
Protected Attributes | |
| TMCCriticalSection * | fCS |
One of the advantage of using a local variable is that the destructor is called if an exception is thrown or if return is called in the middle of the function
For instance, you could write:
{
CWhileInCS cs(criticalSection);
// Code excuted inside the critical section
...
}
// Code excuted outside the critical section
...
| CWhileInCS::CWhileInCS | ( | TMCCriticalSection * | theCS | ) | [inline] |
| CWhileInCS::~CWhileInCS | ( | ) | [inline] |
| void CWhileInCS::Clean | ( | ) | [inline] |
TMCCriticalSection* CWhileInCS::fCS [protected] |
1.5.3