Qore Programming Language Reference Manual 1.14.0
Loading...
Searching...
No Matches
QC_Gate.dox.h
1
2namespace Qore {
4namespace Thread {
6
35class Gate {
36
37public:
39
45
46public:
48
54
55public:
57
67
68public:
70
83int enter(timeout timeout_ms);
84
85public:
87
95nothing enter();
96
97public:
99
108int exit();
109
110public:
112
123
124public:
126
135
136public:
138
151};
152}
153}
The Gate class implements a reentrant thread lock.
Definition: QC_Gate.dox.h:35
int numWaiting()
Returns the number of threads blocked on the Gate.
int numInside()
Returns the current lock count.
nothing enter()
Increments the lock count if the lock is unlocked or already owned by the same thread,...
constructor()
Creates a new Gate object.
copy()
Creates a new Gate object, not based on the original.
int tryEnter()
Acquires the lock if it is unlocked or locked by the same thread, in which case this method returns 0...
int exit()
Decrements the lock counter; if it reaches zero then the lock is unlocked and any blocked threads are...
destructor()
Destroys the Gate object.
int enter(timeout timeout_ms)
Acquires the lock if it is unlocked or locked by the same thread, otherwise blocks until the lock cou...
Qore namespace.
Definition: QC_AbstractSmartLock.dox.h:2