32#ifndef _QORE_AUTOVLOCK_H
34#define _QORE_AUTOVLOCK_H
36class AbstractSmartLock;
40 DLLLOCAL QLckPtr() : rwl(0) {
43 DLLLOCAL
void set(QoreVarRWLock* n_rwl) {
47 DLLLOCAL QoreVarRWLock* getRWL()
const {
51 DLLLOCAL
bool isSet()
const {
55 DLLLOCAL
void unlockAndClear() {
62 DLLLOCAL
void clear() {
68 DLLLOCAL
void unlockIntern() {
94 hashdecl qore_avl_private* priv;
101 DLLLOCAL
void*
operator new(size_t) =
delete;
116 DLLEXPORT
operator bool()
const;
122 DLLLOCAL
void set(QoreVarRWLock* n_rwl);
AutoVLock is a container for safely managing global variable and object lock handovers,...
Definition: AutoVLock.h:80
DLLLOCAL void set(QoreObject *n_o, QoreVarRWLock *n_rwl)
sets the current object (for dereference) and lock
DLLEXPORT void del()
manually releases the lock currently held
DLLLOCAL void clear()
leaves the lock locked and the object referenced and clears the object and lock pointers
DLLEXPORT ~AutoVLock()
releases all locks held and destroys the container
DLLLOCAL QoreObject * getObject() const
gets the current object
DLLEXPORT AutoVLock(ExceptionSink *n_xsink)
creates an empty lock container
DLLLOCAL void set(QoreVarRWLock *n_rwl)
sets the current lock
DLLLOCAL void addMemberNotification(QoreObject *o, const char *member)
adds an object member notification entry, internal-only
DLLLOCAL QoreVarRWLock * getRWL() const
gets the current read-write lock
DLLLOCAL AutoVLock(AutoVLock &&o)=default
default move constructor
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:50
the implementation of Qore's object data type, reference counted, dynamically-allocated only
Definition: QoreObject.h:62