Qore Programming Language
1.12.0
|
provides a safe and exception-safe way to hold locks in Qore, only to be used on the stack, cannot be dynamically allocated More...
#include <QoreThreadLock.h>
Inherited by QoreThreadListIterator.
Public Member Methods | |
DLLLOCAL | AutoLocker (QoreThreadLock &l) |
creates the object and grabs the lock | |
DLLLOCAL | AutoLocker (QoreThreadLock &l, bool already_locked) |
creates the object and grabs the lock More... | |
DLLLOCAL | AutoLocker (QoreThreadLock *l) |
creates the object and grabs the lock | |
DLLLOCAL | AutoLocker (QoreThreadLock *l, bool already_locked) |
creates the object and grabs the lock More... | |
DLLLOCAL | ~AutoLocker () |
destroys the object and releases the lock | |
Private Attributes | |
QoreThreadLock * | lck |
the pointer to the lock that will be managed | |
provides a safe and exception-safe way to hold locks in Qore, only to be used on the stack, cannot be dynamically allocated
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.
|
inline |
creates the object and grabs the lock
|
inline |
creates the object and grabs the lock