6 #include "Honey/Thread/Condition/platform/Condition.h"
20 typedef platform::Condition Super;
30 template<
class Rep,
class Period>
33 template<
class Clock,
class Dur>
38 bool res = Super::wait(lock, time);
Lockable & mutex()
Get the referenced mutex.
Definition: Unique.h:140
A scoped lock that references any lockable. Locks on construction and unlocks on destruction.
Definition: Mutex.h:10
Method to synchronize threads. Condition variables eliminate the need for repeated polling to check t...
Definition: Condition.h:18
TimePoint represented by a duration since a clock's epoch time.
Definition: TimePoint.h:11
static TimePoint now()
Get current time.
Definition: Clock.h:48
bool wait(UniqueLock< Mutex > &lock, Duration< Rep, Period > time)
Release lock and wait until thread is signaled or until an amount of time has passed. Returns true if signaled, false if timed out.
Definition: Condition.h:31
Inherit to declare that class is not copyable.
Definition: Meta.h:286
static auto _
Definition: Module.cpp:8
void broadcast()
Signal all waiting threads to resume, all resumed threads attempt to acquire the lock.
Definition: Condition.h:25
static Thread & current()
Get the thread object of the calling thread.
Definition: Thread.h:156
static constexpr Duration max()
Maximum duration (positive reps)
Definition: Duration.h:86
Duration represented by repetitions of a period. The period must be a ratio.
Definition: Duration.h:7
void wait(UniqueLock< Mutex > &lock)
Release lock and wait until thread is signaled.
Definition: Condition.h:28
bool wait(UniqueLock< Mutex > &lock, TimePoint< Clock, Dur > time)
Release lock and wait until thread is signaled or until a certain time. Returns true if signaled...
Definition: Condition.h:34
void signal()
Signal one waiting thread to resume, resumed thread attempts to acquire the lock. ...
Definition: Condition.h:23
Global Honeycomb namespace.
void interruptPoint()
Throw an exception if interrupt is enabled and has been requested in this thread. ...
Definition: Thread.cpp:46