Convenient template class adapter to safely acquire and release lockable objects. More...
#include <Locker.h>
Public Member Functions | |
Locker (Lockable &target) | |
Creates a locker and acquires the passed target. More... | |
Locker (Lockable *target) | |
Creates a locker and acquires the passed target. More... | |
~Locker () | |
Destructor. More... | |
Convenient template class adapter to safely acquire and release lockable objects.
Lockable | A class that implements methods lock() and unlock(). |
Creates a locker and acquires the passed target.
target | Call the method lock on the passed target. |
Creates a locker and acquires the passed target.
target | Call the method lock on the passed target. |
Destructor.
Also calls the method unlock on the target previously passed to the constructor.