Class ILLIXR::event
A boolean condition-variable. More...
#include <stoplight.hpp>
Public Functions
Type | Name |
---|---|
void | clear () Clears the condition-variable. |
bool | is_set () const Test if is set without blocking. |
void | set (bool new_value=true) Sets the condition-variable to new_value. |
void | wait () const Wait indefinitely for the event to be set. |
bool | wait_timeout (const std::chrono::duration< Rep, Period > & duration) const Wait for the event to be set with a timeout. |
Detailed Description
Inspired by https://docs.python.org/3/library/threading.html#event-objects
Public Functions Documentation
function clear
Clears the condition-variable.
inline void ILLIXR::event::clear ()
function is_set
Test if is set without blocking.
inline bool ILLIXR::event::is_set () const
function set
Sets the condition-variable to new_value.
inline void ILLIXR::event::set (
bool new_value=true
)
Defaults to true, so that set() sets the bool.
function wait
Wait indefinitely for the event to be set.
inline void ILLIXR::event::wait () const
function wait_timeout
Wait for the event to be set with a timeout.
template<class Clock, class Rep, class Period>
inline bool ILLIXR::event::wait_timeout (
const std::chrono::duration< Rep, Period > & duration
) const
Returns whether the event was actually set.
The documentation for this class was generated from the following file /home/friedel/devel/ILLIXR/include/illixr/stoplight.hpp