Qore Programming Language Reference Manual 1.19.2
Loading...
Searching...
No Matches
QC_AutoLock.dox.h
1
2namespace Qore {
4namespace Thread {
6
35class AutoLock {
36
37public:
39
55
56public:
58
61
62public:
64
72
73public:
75
85nothing lock();
86
87public:
89
99int trylock();
100
101public:
103
110nothing unlock();
111};
112}
113}
A helper class for the Mutex class for exception-safe Mutex handling.
Definition: QC_AutoLock.dox.h:35
copy()
Throws an exception; objects of this class cannot be copied.
nothing unlock()
Unlocks the Mutex object being managed; wakes up one thread if any threads are blocked on this lock.
nothing lock()
Attempts to relock the Mutex object being managed.
destructor()
Calls Mutex::unlock() on the saved Mutex object and destroys the AutoLock object.
int trylock()
Attempts to relock the Mutex object being managed; acquires the lock only if it is not already held; ...
constructor(Mutex mutex)
Creates the AutoLock object based on the Mutex argument passed and immediately calls Mutex::lock()
A class providing an implementation for a simple thread lock.
Definition: QC_Mutex.dox.h:37
Qore namespace.
Definition: QC_AbstractSmartLock.dox.h:2