Qore Programming Language Reference Manual: lib/QC_AutoLock.dox.h Source File

Qore Programming Language Reference Manual 0.8.11

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

All Classes Namespaces Functions Variables Groups Pages
QC_AutoLock.dox.h
1 namespace Qore::Thread {
4
33 class AutoLock {
34
35 public:
37
52 constructor(Mutex mutex);
53
54 public:
56
58 copy();
59
60 public:
62
69 destructor();
70
71 public:
73
83 nothing lock();
84
85 public:
87
97 int trylock();
98
99 public:
101
108 nothing unlock();
109 };
110 };
Qore::Thread::AutoLock
A helper class for the Mutex class for exception-safe Mutex handling.
Definition: QC_AutoLock.dox.h:33
Qore::Thread::Mutex
A class providing an implementation for a simple thread lock.
Definition: QC_Mutex.dox.h:27
Qore::Thread::AutoLock::constructor
constructor(Mutex mutex)
Creates the AutoLock object based on the Mutex argument passed and immediately calls Mutex::lock() ...
Qore::Thread::AutoLock::copy
copy()
Throws an exception; objects of this class cannot be copied.
Qore::Thread::AutoLock::trylock
int trylock()
Attempts to relock the Mutex object being managed; acquires the lock only if it is not already held; ...
Qore::Thread::AutoLock::lock
nothing lock()
Attempts to relock the Mutex object being managed.
Qore::Thread::AutoLock::unlock
nothing unlock()
Unlocks the Mutex object being managed; wakes up one thread if any threads are blocked on this lock...
Qore::Thread::AutoLock::destructor
destructor()
Calls Mutex::unlock() on the saved Mutex object and destroys the AutoLock object. ...