Qore Programming Language Reference Manual  0.8.12.2
 All Classes Namespaces Functions Variables Groups Pages
QC_Gate.dox.h
1 namespace Qore::Thread {
4 
33 class Gate {
34 
35 public:
37 
42  constructor();
43 
44 public:
46 
51  copy();
52 
53 public:
55 
64  destructor();
65 
66 public:
68 
81 int enter(timeout timeout_ms);
82 
83 public:
85 
93 nothing enter();
94 
95 public:
97 
106 int exit();
107 
108 public:
110 
120 int numInside();
121 
122 public:
124 
132 int numWaiting();
133 
134 public:
136 
148 int tryEnter();
149 };
150 };
int numInside()
Returns the current lock count.
int exit()
Decrements the lock counter; if it reaches zero then the lock is unlocked and any blocked threads are...
int numWaiting()
Returns the number of threads blocked on the Gate.
copy()
Creates a new Gate object, not based on the original.
The Gate class implements a reentrant thread lock.
Definition: QC_Gate.dox.h:33
destructor()
Destroys the Gate object.
constructor()
Creates a new Gate object.
int tryEnter()
Acquires the lock if it is unlocked or locked by the same thread, in which case this method returns 0...
nothing enter()
Increments the lock count if the lock is unlocked or already owned by the same thread, otherwise blocks until the lock counter reaches zero.