24 #ifndef _QORE_QORECONDITION_H
26 #define _QORE_QORECONDITION_H
31 #include <qore/QoreThreadLock.h>
46 DLLLOCAL QoreCondition& operator=(
const QoreCondition&);
66 DLLEXPORT
int wait(pthread_mutex_t *m);
76 DLLEXPORT
int wait(pthread_mutex_t *m,
int timeout_ms);
84 DLLEXPORT
int wait2(pthread_mutex_t *m, int64 timeout_ms);
92 return wait(&l->ptm_lock);
104 return wait(&l->ptm_lock, timeout_ms);
114 return wait2(&l->ptm_lock, timeout_ms);
135 return wait(&l, timeout_ms);
145 return wait2(&l, timeout_ms);
149 #endif // QORE_CONDITION
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 ...
Definition: QoreCondition.h:134
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 ...
Definition: QoreCondition.h:113
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 ...
Definition: QoreCondition.h:144
DLLLOCAL int wait(QoreThreadLock &l)
blocks a thread on a lock until the condition is signaled
Definition: QoreCondition.h:122
DLLLOCAL int wait(QoreThreadLock *l)
blocks a thread on a lock until the condition is signaled
Definition: QoreCondition.h:91
DLLEXPORT int signal()
signals a single waiting thread to wake up
a thread condition class implementing a wrapper for pthread_cond_t
Definition: QoreCondition.h:37
DLLEXPORT int broadcast()
singles all threads blocked on this condition to wake up
DLLEXPORT ~QoreCondition()
destroys the condition object
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 ...
Definition: QoreCondition.h:103
provides a mutually-exclusive thread lock
Definition: QoreThreadLock.h:41
DLLEXPORT QoreCondition()
creates the condition object
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 ...
DLLEXPORT int wait(pthread_mutex_t *m)
blocks a thread on a mutex until the condition is signaled