|
|
This is a convenience class that holds a lock for the duration of the scope of the object. It is very convenient to use if exceptions can be thrown, simply declare an auto toLocker to hold the lock. If any exception is thrown the locker will be deallocated and the lock released.
toLocker (toLock &lock)
| toLocker |
Create locker.
Parameters:
lock | Lock to hold. |
~toLocker ()
| ~toLocker |