Qore Programming Language Reference Manual  0.8.13.2
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 
50 int dec();
51 
52 public:
54 
63  destructor();
64 
65 public:
67 
77 int getCount();
78 
79 public:
81 
91 int getWaiting();
92 
93 public:
95 
100 nothing inc();
101 
102 public:
104 
111 nothing waitForZero();
112 
113 public:
115 
127 int waitForZero(timeout timeout_ms);
128 };
129 };
int getCount()
Returns the current counter value.
destructor()
Destroys the Counter object.
int getWaiting()
Returns the number of threads currently blocked on this object.
nothing inc()
Atomically increments the counter value.
constructor(softint c=0)
Creates the Counter object.
int dec()
Atomically decrements the counter value.
Implements a class that can be used for blocking a thread until a counter reaches zero...
Definition: QC_Counter.dox.h:11
nothing waitForZero()
Blocks a thread until the counter reaches zero.
copy()
Creates a new Counter object with the same count as the original.
Qore::Thread namespace.
Definition: QC_AbstractSmartLock.dox.h:2