All Classes Namespaces Functions Variables Groups Pages
QC_Counter.dox.h
namespace Qore::Thread {
class Counter {
public:
constructor(softint c = 0);
public:
copy();
public:
nothing dec();
public:
destructor();
public:
int getCount();
public:
int getWaiting();
public:
nothing inc();
public:
nothing waitForZero();
public:
int waitForZero(timeout timeout_ms);
};
};
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.