class Condition1 : public ConditionBase { public: void wait() { pthread_mutex_lock(&mutex_); pthread_cond_wait(&cond_, &mutex_); pthread_mutex_unlock(&mutex_); } void wakeup() { pthread_cond_signal(&cond_); } };