  | 
  
    Qore Programming Language
    0.9.16
    
   | 
 
 
 
 
   32 #ifndef _QORE_QORECONDITION_H 
   34 #define _QORE_QORECONDITION_H 
   39 #include <qore/QoreThreadLock.h> 
   75     DLLEXPORT 
int wait(pthread_mutex_t* m);
 
   86     DLLEXPORT 
int wait(pthread_mutex_t* m, 
int timeout_ms);
 
   95     DLLEXPORT 
int wait2(pthread_mutex_t* m, 
int64 timeout_ms);
 
  104         return wait(&l->ptm_lock);
 
  117         return wait(&l->ptm_lock, timeout_ms);
 
  128         return wait2(&l->ptm_lock, timeout_ms);
 
  151         return wait(&l, timeout_ms);
 
  162         return wait2(&l, timeout_ms);
 
  166 #endif // QORE_CONDITION 
  
 
DLLEXPORT QoreCondition()
creates the condition object
 
a thread condition class implementing a wrapper for pthread_cond_t
Definition: QoreCondition.h:45
 
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
 
DLLEXPORT int broadcast()
singles all threads blocked on this condition to wake up
 
DLLEXPORT int signal()
signals a single waiting thread to wake up
 
provides a mutually-exclusive thread lock
Definition: QoreThreadLock.h:49
 
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