32 #ifndef _QORE_QORECONDITION_H 
   34 #define _QORE_QORECONDITION_H 
   39 #include <qore/QoreThreadLock.h> 
   65     DLLEXPORT 
int wait(pthread_mutex_t* m);
 
   76     DLLEXPORT 
int wait(pthread_mutex_t* m, 
int timeout_ms);
 
   85     DLLEXPORT 
int wait2(pthread_mutex_t* m, 
int64 timeout_ms);
 
   94         return wait(&l->ptm_lock);
 
  107         return wait(&l->ptm_lock, timeout_ms);
 
  118         return wait2(&l->ptm_lock, timeout_ms);
 
  141         return wait(&l, timeout_ms);
 
  152         return wait2(&l, timeout_ms);
 
a thread condition class implementing a wrapper for pthread_cond_t
Definition: QoreCondition.h:45
 
DLLEXPORT ~QoreCondition()
destroys the condition object
 
DLLEXPORT int wait(pthread_mutex_t *m)
blocks a thread on a mutex 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
 
DLLEXPORT int signal()
signals a single waiting thread to wake up
 
DLLEXPORT int broadcast()
singles all threads blocked on this condition to wake up
 
DLLEXPORT QoreCondition()
creates the condition object
 
provides a mutually-exclusive thread lock
Definition: QoreThreadLock.h:49
 
long long int64
64bit integer type, cannot use int64_t here since it breaks the API on some 64-bit systems due to equ...
Definition: common.h:260