32 #ifndef _QORE_QORECONDITION_H
34 #define _QORE_QORECONDITION_H
39 #include <qore/QoreThreadLock.h>
54 DLLLOCAL QoreCondition& operator=(
const QoreCondition&);
74 DLLEXPORT
int wait(pthread_mutex_t *m);
84 DLLEXPORT
int wait(pthread_mutex_t *m,
int timeout_ms);
92 DLLEXPORT
int wait2(pthread_mutex_t *m, int64 timeout_ms);
100 return wait(&l->ptm_lock);
112 return wait(&l->ptm_lock, timeout_ms);
122 return wait2(&l->ptm_lock, timeout_ms);
143 return wait(&l, timeout_ms);
153 return wait2(&l, timeout_ms);
157 #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:142
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:121
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:152
DLLLOCAL int wait(QoreThreadLock &l)
blocks a thread on a lock until the condition is signaled
Definition: QoreCondition.h:130
DLLLOCAL int wait(QoreThreadLock *l)
blocks a thread on a lock until the condition is signaled
Definition: QoreCondition.h:99
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:45
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:111
provides a mutually-exclusive thread lock
Definition: QoreThreadLock.h:49
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