Honeycomb  0.1
Component-Model Framework
Condition.h
Go to the documentation of this file.
1 // Honeycomb, Copyright (C) 2014 NewGamePlus Inc. Distributed under the Boost Software License v1.0.
2 #pragma once
3 
5 namespace honey { namespace platform
6 {
7 
8 class Condition
9 {
10 public:
11  Condition();
12  virtual ~Condition();
13 
14  void signal();
15  void broadcast();
16 
17  void wait(UniqueLock<honey::Mutex>& lock) { wait(lock, honey::MonoClock::TimePoint::max); }
18  bool wait(UniqueLock<honey::Mutex>& lock, honey::MonoClock::Duration time) { return wait(lock, honey::MonoClock::now() + time); }
19  bool wait(UniqueLock<honey::Mutex>& external, honey::MonoClock::TimePoint time);
20 
21 private:
22  pthread_cond_t _handle;
23 };
24 
25 } }
static TimePoint now()
Get current time.
Definition: Clock.h:48
Super::TimePoint TimePoint
Definition: Clock.h:40
TimePoint::Duration Duration
Definition: Clock.h:41
Global Honeycomb namespace.