Qore Programming Language Reference Manual 0.8.8

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

All Classes Namespaces Functions Variables Groups Pages
QC_Counter.dox.h
1 namespace Qore::Thread {
4
11 class Counter {
12
13 public:
15
24 constructor(softint c = 0);
25
26 public:
28
33 copy();
34
35 public:
37
46 nothing dec();
47
48 public:
50
59 destructor();
60
61 public:
63
73 int getCount();
74
75 public:
77
87 int getWaiting();
88
89 public:
91
96 nothing inc();
97
98 public:
100
107 nothing waitForZero();
108
109 public:
111
123 int waitForZero(timeout timeout_ms);
124 };
125 };
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::inc
nothing inc()
Atomically increments the counter value.
Qore::Thread::Counter::constructor
constructor(softint c=0)
Creates the Counter object.
Qore::Thread::Counter::dec
nothing 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:11
Qore::Thread::Counter::waitForZero
nothing waitForZero()
Blocks a thread until the counter reaches zero.
Qore::Thread::Counter::copy
copy()
Creates a new Counter object with the same count as the original.