24 #ifndef LIBTHREADAR_CONDITION_HPP
25 #define LIBTHREADAR_CONDITION_HPP
77 void wait(
unsigned int instance = 0);
85 void signal(
unsigned int instance = 0);
93 void broadcast(
unsigned int instance = 0);
101 std::deque<pthread_cond_t> cond;
102 std::deque<unsigned int> counter;
defines the mutex C++ class
defines a set of exceptions that are used by libthreadar to report error situations ...
void broadcast(unsigned int instance=0)
awakes all threads suspended after having called wait()
condition(unsigned int num=1)
constructor
void signal(unsigned int instance=0)
awakes a single thread suspended after having called wait()
void wait(unsigned int instance=0)
put the calling thread on hold waiting for another thread to call signal()
condition & operator=(const condition &ref)=delete
no assignment operator
Wrapper around the Posix pthread_cond_t object and its associated mutex.
unsigned int get_waiting_thread_count(unsigned int instance=0)
return the number of thread currently waiting on that condition
This is the only namespace used in libthreadar and all symbols provided by libthreadar are member of ...
Wrapper around the Posix pthread_mutex_t C objects.