#include <Lock.h>
Collaboration diagram for GNE::Lock< T >:
Public Member Functions | |
Lock (T &objToLock) |
This is handy if a largish function has multiple exit points espically if it throws exceptions. This class makes sure that once you lock the object it will be unlocked when you leave the scope.
A Lock instance may not be copied, and you must specify a object to lock in its constructor.
Lock objects can work for any object that has the methods "acquire" and "release". In GNE these are Mutexes, ConditionVariables, and classes that inherit from SynchronizedObject.
LockCV