class Condition7 : public ConditionBase { public: Condition7() : signal_(false) { } void wait() { pthread_mutex_lock(&mutex_); while (!signal_) { pthread_cond_wait(&cond_, &mutex_); } signal_ = false; pthread_mutex_unlock(&mutex_); } void wakeup() { pthread_mutex_lock(&mutex_); signal_ = true; pthread_cond_broadcast(&cond_); pthread_mutex_unlock(&mutex_); } private: bool signal_; };