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