My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
CondVar.h
Go to the documentation of this file.
1 #ifndef GCP_UTIL_CONDVAR_H
2 #define GCP_UTIL_CONDVAR_H
3 
11 #include "gcp/util/common/Mutex.h"
12 
13 #include <pthread.h>
14 
15 namespace gcp {
16  namespace util {
17 
18  class CondVar {
19  public:
20 
24  CondVar();
25 
29  virtual ~CondVar();
30 
31  void wait();
32  void broadcast();
33 
34  private:
35 
36  Mutex mutex_;
37  pthread_cond_t cond_;
38  bool condVarIsReady_;
39 
40  }; // End class CondVar
41 
42  } // End namespace util
43 } // End namespace gcp
44 
45 
46 
47 #endif // End #ifndef GCP_UTIL_CONDVAR_H
Definition: Mutex.h:16
virtual ~CondVar()
Definition: CondVar.cc:62
CondVar()
Definition: CondVar.cc:14
Definition: CondVar.h:18