![]() |
Qore Programming Language 2.3.0
|
a thread condition class implementing a wrapper for pthread_cond_t More...
#include <QoreCondition.h>
Inherited by DatasourcePool.
Public Member Methods | |
| DLLEXPORT | QoreCondition () |
| creates the condition object | |
| DLLEXPORT | ~QoreCondition () |
| destroys the condition object | |
| DLLEXPORT int | broadcast () |
| singles all threads blocked on this condition to wake up | |
| DLLEXPORT int | signal () |
| signals a single waiting thread to wake up | |
| DLLEXPORT int | wait (pthread_mutex_t *m) |
| blocks a thread on a mutex until the condition is signaled | |
| DLLEXPORT int | wait (pthread_mutex_t *m, int timeout_ms) |
| blocks a thread on a mutex for a certain number of milliseconds until the condition is signaled | |
| DLLLOCAL int | wait (QoreThreadLock &l) |
| blocks a thread on a lock until the condition is signaled | |
| DLLLOCAL int | wait (QoreThreadLock &l, int timeout_ms) |
| blocks a thread on a lock for a certain number of milliseconds until the condition is signaled | |
| DLLLOCAL int | wait (QoreThreadLock *l) |
| blocks a thread on a lock until the condition is signaled | |
| DLLLOCAL int | wait (QoreThreadLock *l, int timeout_ms) |
| blocks a thread on a lock for a certain number of milliseconds until the condition is signaled | |
| DLLEXPORT int | wait2 (pthread_mutex_t *m, int64 timeout_ms) |
| blocks a thread on a mutex for a certain number of milliseconds until the condition is signaled | |
| DLLLOCAL int | wait2 (QoreThreadLock &l, int64 timeout_ms) |
| blocks a thread on a lock for a certain number of milliseconds until the condition is signaled | |
| DLLLOCAL int | wait2 (QoreThreadLock *l, int64 timeout_ms) |
| blocks a thread on a lock for a certain number of milliseconds until the condition is signaled | |
| DLLEXPORT int | waitWithInterrupt (pthread_mutex_t *m, ExceptionSink *xsink=nullptr) |
| blocks a thread on a mutex until the condition is signaled, with interrupt support | |
| DLLEXPORT int | waitWithInterrupt (pthread_mutex_t *m, int64 timeout_ms, ExceptionSink *xsink=nullptr) |
| blocks a thread on a mutex for a certain number of milliseconds until the condition is signaled, with interrupt support | |
| DLLLOCAL int | waitWithInterrupt (QoreThreadLock &l, ExceptionSink *xsink=nullptr) |
| blocks a thread on a lock until the condition is signaled, with interrupt support | |
| DLLLOCAL int | waitWithInterrupt (QoreThreadLock &l, int64 timeout_ms, ExceptionSink *xsink=nullptr) |
| blocks a thread on a lock for a certain number of milliseconds until the condition is signaled, with interrupt support | |
| DLLLOCAL int | waitWithInterrupt (QoreThreadLock *l, ExceptionSink *xsink=nullptr) |
| blocks a thread on a lock until the condition is signaled, with interrupt support | |
| DLLLOCAL int | waitWithInterrupt (QoreThreadLock *l, int64 timeout_ms, ExceptionSink *xsink=nullptr) |
| blocks a thread on a lock for a certain number of milliseconds until the condition is signaled, with interrupt support | |
a thread condition class implementing a wrapper for pthread_cond_t
all threads that block on a given QoreCondition object should use the same mutex or QoreThreadLock object for blocking
| DLLEXPORT int QoreCondition::wait | ( | pthread_mutex_t * | m | ) |
| DLLEXPORT int QoreCondition::wait | ( | pthread_mutex_t * | m, |
| int | timeout_ms | ||
| ) |
blocks a thread on a mutex for a certain number of milliseconds until the condition is signaled
| m | the mutext to wait on |
| timeout_ms | the timeout value is milliseconds; if <= 0 will wait indefinitely |
|
inline |
blocks a thread on a lock until the condition is signaled
| l | the QoreThreadLock to wait on |
References wait().
|
inline |
blocks a thread on a lock for a certain number of milliseconds until the condition is signaled
| l | the QoreThreadLock to wait on |
| timeout_ms | the timeout value is milliseconds; if <= 0 will wait indefinitely |
|
inline |
blocks a thread on a lock until the condition is signaled
| l | the QoreThreadLock to wait on |
References wait().
|
inline |
blocks a thread on a lock for a certain number of milliseconds until the condition is signaled
| l | the QoreThreadLock to wait on |
| timeout_ms | the timeout value is milliseconds; if <= 0 will wait indefinitely |
| DLLEXPORT int QoreCondition::wait2 | ( | pthread_mutex_t * | m, |
| int64 | timeout_ms | ||
| ) |
blocks a thread on a mutex for a certain number of milliseconds until the condition is signaled
| m | the mutext to wait on |
| timeout_ms | the timeout value is milliseconds; if <= 0 will wait indefinitely |
|
inline |
blocks a thread on a lock for a certain number of milliseconds until the condition is signaled
| l | the QoreThreadLock to wait on |
| timeout_ms | the timeout value is milliseconds; if <= 0 will wait indefinitely |
|
inline |
blocks a thread on a lock for a certain number of milliseconds until the condition is signaled
| l | the QoreThreadLock to wait on |
| timeout_ms | the timeout value is milliseconds; if <= 0 will wait indefinitely |
| DLLEXPORT int QoreCondition::waitWithInterrupt | ( | pthread_mutex_t * | m, |
| ExceptionSink * | xsink = nullptr |
||
| ) |
blocks a thread on a mutex until the condition is signaled, with interrupt support
This method supports sandbox interrupt checking. When a SandboxManager is attached to the current program and an interrupt is requested, this method will return with QORE_COND_RESULT_INTERRUPTED.
| m | the mutex to wait on |
| xsink | exception sink for interrupt errors (optional - if nullptr, no exception raised) |
Referenced by waitWithInterrupt(), waitWithInterrupt(), waitWithInterrupt(), and waitWithInterrupt().
| DLLEXPORT int QoreCondition::waitWithInterrupt | ( | pthread_mutex_t * | m, |
| int64 | timeout_ms, | ||
| ExceptionSink * | xsink = nullptr |
||
| ) |
blocks a thread on a mutex for a certain number of milliseconds until the condition is signaled, with interrupt support
This method supports sandbox interrupt checking. When a SandboxManager is attached to the current program and an interrupt is requested, this method will return with QORE_COND_RESULT_INTERRUPTED.
| m | the mutex to wait on |
| timeout_ms | the timeout value in milliseconds; if < 0 will wait indefinitely |
| xsink | exception sink for interrupt errors (optional - if nullptr, no exception raised) |
|
inline |
blocks a thread on a lock until the condition is signaled, with interrupt support
This method supports sandbox interrupt checking.
| l | the QoreThreadLock to wait on |
| xsink | exception sink for interrupt errors (optional) |
References waitWithInterrupt().
|
inline |
blocks a thread on a lock for a certain number of milliseconds until the condition is signaled, with interrupt support
This method supports sandbox interrupt checking.
| l | the QoreThreadLock to wait on |
| timeout_ms | the timeout value in milliseconds; if < 0 will wait indefinitely |
| xsink | exception sink for interrupt errors (optional) |
References signal(), and waitWithInterrupt().
|
inline |
blocks a thread on a lock until the condition is signaled, with interrupt support
This method supports sandbox interrupt checking.
| l | the QoreThreadLock to wait on |
| xsink | exception sink for interrupt errors (optional) |
References waitWithInterrupt().
|
inline |
blocks a thread on a lock for a certain number of milliseconds until the condition is signaled, with interrupt support
This method supports sandbox interrupt checking.
| l | the QoreThreadLock to wait on |
| timeout_ms | the timeout value in milliseconds; if < 0 will wait indefinitely |
| xsink | exception sink for interrupt errors (optional) |
References signal(), and waitWithInterrupt().