#include <QoreThreadLock.h>
Public Member Functions | |
DLLLOCAL | AutoLocker (QoreThreadLock *l) |
creates the object and grabs the lock | |
DLLLOCAL | AutoLocker (QoreThreadLock &l) |
creates the object and grabs the lock | |
DLLLOCAL | ~AutoLocker () |
destroys the object and grabs the lock | |
Protected Attributes | |
QoreThreadLock * | lck |
the pointer to the lock that will be managed |
Ensures that locks are released by locking the lock when the object is created and releasing it when the object is destroyed. For a similar object that allows for unlocking the lock earlier than the object's destruction, see SafeLocker.