![]() |
Qore Programming Language 1.19.5
|
This is the implementation of the "Counter" Qore class (private data) More...
#include <QoreCounter.h>
Additional Inherited Members | |
Public Member Methods inherited from AbstractPrivateData | |
| virtual DLLLOCAL void | deref () |
| decrements the reference count of the object without the possibility of throwing a Qore-language exception | |
| virtual DLLLOCAL void | deref (ExceptionSink *xsink) |
| decrements the reference count of the object More... | |
| DLLLOCAL void | ref () const |
| increments the reference count of the object | |
Public Member Methods inherited from QoreReferenceCounter | |
| DLLEXPORT | QoreReferenceCounter () |
| creates the reference counter object | |
| DLLEXPORT | QoreReferenceCounter (const QoreReferenceCounter &old) |
| creates a new object with a reference count of 1 More... | |
| DLLEXPORT | ~QoreReferenceCounter () |
| destroys the reference counter object | |
| DLLEXPORT bool | is_unique () const |
| returns true if the reference count is 1 More... | |
| DLLEXPORT int | reference_count () const |
| gets the reference count More... | |
| DLLEXPORT bool | ROdereference () const |
| atomically decrements the reference count More... | |
| DLLEXPORT void | ROreference () const |
| atomically increments the reference count | |
Public Member Methods inherited from QoreCounter | |
| DLLEXPORT | QoreCounter (int nc=0) |
| creates the counter and initializes the count | |
| DLLEXPORT | ~QoreCounter () |
| destroys the object and frees all memory | |
| DLLEXPORT int | dec (ExceptionSink *xsink) |
| decrements the counter and wakes up any threads if the counter reaches 0 More... | |
| DLLEXPORT void | destructor (ExceptionSink *xsink) |
| throws a Qore-language exception if there are any waiting threads and wakes them all up | |
| DLLEXPORT int | getCount () const |
| returns the current count | |
| DLLEXPORT int | getWaiting () const |
| returns the number of threads blocked on this object | |
| DLLEXPORT int | inc () |
| increments the counter More... | |
| DLLEXPORT int | waitForZero (ExceptionSink *xsink, int timeout_ms=0) |
| blocks the calling thread until the counter reaches 0 More... | |
Private Member Methods inherited from AbstractPrivateData | |
| virtual DLLLOCAL | ~AbstractPrivateData () |
| as these objects are reference counted, the destructor should be called only when the reference count = 0 and not manually | |
This is the implementation of the "Counter" Qore class (private data)