Skip to content

Class ILLIXR::Event

ClassList > 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 include/illixr/stoplight.hpp