Public Member Functions | Private Attributes | List of all members
Waiter Class Reference

#include <waiter.h>

Public Member Functions

void notify ()
 
void wait ()
 
void wait_for (std::chrono::seconds seconds)
 
void wait_for_millis (std::chrono::milliseconds millis)
 
 Waiter ()
 
 ~Waiter ()=default
 

Private Attributes

std::condition_variable cv
 
std::mutex mtx
 

Detailed Description

Class used to provide easy mechanism to wait and notify.

Definition at line 24 of file waiter.h.

Constructor & Destructor Documentation

Waiter::Waiter ( )
inline

Definition at line 28 of file waiter.h.

Waiter::~Waiter ( )
default

Member Function Documentation

void Waiter::notify ( )
inline

Notify all waiters.

Definition at line 60 of file waiter.h.

void Waiter::wait ( )
inline

Wait until notified (blocking).

Definition at line 34 of file waiter.h.

void Waiter::wait_for ( std::chrono::seconds  seconds)
inline

Wait until notified or timed out.

Parameters
secondsseconds

Definition at line 52 of file waiter.h.

void Waiter::wait_for_millis ( std::chrono::milliseconds  millis)
inline

Wait until notified or timed out.

Parameters
millismilliseconds

Definition at line 43 of file waiter.h.

Member Data Documentation

std::condition_variable Waiter::cv
private

Definition at line 66 of file waiter.h.

std::mutex Waiter::mtx
mutableprivate

Definition at line 67 of file waiter.h.


The documentation for this class was generated from the following file:


dataflow_lite
Author(s): AWS RoboMaker
autogenerated on Fri May 7 2021 02:18:22