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