| Qore Programming Language Reference Manual 1.0.8

QC_Counter.dox.h
1 namespace Qore {
4 namespace Thread {
6
13 class Counter {
14
15 public:
17
26 constructor(softint c = 0);
27
28 public:
30
35 copy();
36
37 public:
39
52 int dec();
53
54 public:
56
65 destructor();
66
67 public:
69
79 int getCount();
80
81 public:
83
93 int getWaiting();
94
95 public:
97
106 int inc();
107
108 public:
110
117 nothing waitForZero();
118
119 public:
121
133 int waitForZero(timeout timeout_ms);
134 };
135 }
136 }
Qore::Thread::Counter::getCount
int getCount()
Returns the current counter value.
Qore::Thread::Counter::destructor
destructor()
Destroys the Counter object.
Qore::Thread::Counter::getWaiting
int getWaiting()
Returns the number of threads currently blocked on this object.
Qore::Thread::Counter::constructor
constructor(softint c=0)
Creates the Counter object.
Qore::Thread::Counter::dec
int dec()
Atomically decrements the counter value.
Qore::Thread::Counter
Implements a class that can be used for blocking a thread until a counter reaches zero...
Definition: QC_Counter.dox.h:13
Qore::Thread::Counter::inc
int inc()
Atomically increments the counter value.
Qore::Thread::Counter::waitForZero
nothing waitForZero()
Blocks a thread until the counter reaches zero.
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
Qore::Thread::Counter::copy
copy()
Creates a new Counter object with the same count as the original.