![]() |
NetBurner 3.3.9
PDF Version |
A simple wrapper class that helps use OS locks effectively. More...
#include <nbrtos.h>
Public Member Functions | |
OSLockObj () | |
Initialize the OSLockObj and calls OSLock(). | |
~OSLockObj () | |
Destructs the OSLockObj and calls OSUnlock(). | |
A simple wrapper class that helps use OS locks effectively.
When an OSLockObj is constructed it locks the OS. When it is destructed it unlocks the OS. If you have a function that needs an OS lock and has multiple points of exit, create an OSLockObj at the beginning of the function. Important: No matter how you leave the function, the destructor will release the lock.