void fct() { LockScope ls(myCriticalSectionHandle); //do what is critical } //no need to do anything else, the scope locker destructor is called //automatically, releasing the lock
.
More...
#include <CriticalSection.hpp>
Public Member Functions | |
LockScope (CriticalSection *CSPtrPrm) | |
Locks the current scope using the given CriticalSection object. |
void fct() { LockScope ls(myCriticalSectionHandle); //do what is critical } //no need to do anything else, the scope locker destructor is called //automatically, releasing the lock
.