a thread condition class implementing a wrapper for pthread_cond_t
More...
#include <QoreCondition.h>
Inherited by DatasourcePool.
|
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
|
|
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
- See also
- QoreThreadLock
◆ wait() [1/6]
blocks a thread on a mutex until the condition is signaled
- Parameters
-
- Returns
- 0 for success, non-zero for error
Referenced by wait(), wait(), wait(), and wait().
◆ wait() [2/6]
blocks a thread on a mutex for a certain number of milliseconds until the condition is signaled
- Parameters
-
m | the mutext to wait on |
timeout_ms | the timeout value is milliseconds; if <= 0 will wait indefinitely |
- Returns
- a non-zero return value indicates a timeout occured
- Deprecated:
- use wait2(pthread_mutex_t*, int64) instead
◆ wait() [3/6]
blocks a thread on a lock until the condition is signaled
- Parameters
-
- Returns
- 0 for success, non-zero for error
References wait().
◆ wait() [4/6]
blocks a thread on a lock for a certain number of milliseconds until the condition is signaled
- Parameters
-
l | the QoreThreadLock to wait on |
timeout_ms | the timeout value is milliseconds; if <= 0 will wait indefinitely |
- Returns
- a non-zero return value indicates a timeout occured
- Deprecated:
- use wait2(QoreThreadLock&, int64) instead
References signal(), and wait().
◆ wait() [5/6]
blocks a thread on a lock until the condition is signaled
- Parameters
-
- Returns
- 0 for success, non-zero for error
References wait().
◆ wait() [6/6]
blocks a thread on a lock for a certain number of milliseconds until the condition is signaled
- Parameters
-
l | the QoreThreadLock to wait on |
timeout_ms | the timeout value is milliseconds; if <= 0 will wait indefinitely |
- Returns
- a non-zero return value indicates a timeout occured
- Deprecated:
- use wait2(QoreThreadLock*, int64) instead
References signal(), and wait().
◆ wait2() [1/3]
blocks a thread on a mutex for a certain number of milliseconds until the condition is signaled
- Parameters
-
m | the mutext to wait on |
timeout_ms | the timeout value is milliseconds; if <= 0 will wait indefinitely |
- Returns
- a non-zero return value indicates a timeout occured
Referenced by wait2(), and wait2().
◆ wait2() [2/3]
blocks a thread on a lock for a certain number of milliseconds until the condition is signaled
- Parameters
-
l | the QoreThreadLock to wait on |
timeout_ms | the timeout value is milliseconds; if <= 0 will wait indefinitely |
- Returns
- a non-zero return value indicates a timeout occured
References signal(), and wait2().
◆ wait2() [3/3]
blocks a thread on a lock for a certain number of milliseconds until the condition is signaled
- Parameters
-
l | the QoreThreadLock to wait on |
timeout_ms | the timeout value is milliseconds; if <= 0 will wait indefinitely |
- Returns
- a non-zero return value indicates a timeout occured
References signal(), and wait2().
The documentation for this class was generated from the following file: