Qore Programming Language Reference Manual  0.8.9
 All Classes Namespaces Functions Variables Groups Pages
QC_Mutex.dox.h
1 namespace Qore::Thread {
4 
27 class Mutex : public AbstractSmartLock {
28 
29 public:
31 
36  constructor();
37 
38 public:
40 
45  copy();
46 
47 public:
49 
58  destructor();
59 
60 public:
62 
72 nothing lock();
73 
74 public:
76 
93 int lock(timeout timeout_ms);
94 
95 public:
97 
107 int trylock();
108 
109 public:
111 
118 nothing unlock();
119 };
120 };
copy()
Creates a new Mutex object, not based on the original.
The abstract base class for locks that support the internal API for use with the Condition class...
Definition: QC_AbstractSmartLock.dox.h:13
A class providing an implementation for a simple thread lock.
Definition: QC_Mutex.dox.h:27
nothing lock()
Locks the Mutex object; blocks if the lock is already held.
nothing unlock()
Unlocks the Mutex object; wakes up one thread if any threads are blocked on this lock.
int trylock()
Acquires the lock only if it is not already held; returns 0 for success (lock acquired) or -1 if the ...
destructor()
Destroys the object.
constructor()
Creates the Mutex object.