ecor
Loading...
Searching...
No Matches
ecor::broadcast_source< S > Struct Template Reference

Broadcast source that implements a scheduler that allows multiple receivers to be scheduled with the same completion signatures, and when a completion signal is sent, it is broadcast to all scheduled receivers. More...

#include <ecor.hpp>

Public Types

using sender_type = _ll_sender< S... >
 

Public Member Functions

_ll_sender< S... > schedule () noexcept
 Schedule a new receiver with this source.
 
template<typename E >
void set_error (E &&err)
 Send a set_error signal to all scheduled receivers. More...
 
void set_stopped ()
 Send a set_stopped signal to all scheduled receivers. More...
 
template<typename... Args>
void set_value (Args &&... args)
 Send a set_value signal to all scheduled receivers. More...
 

Detailed Description

template<signature... S>
struct ecor::broadcast_source< S >

Broadcast source that implements a scheduler that allows multiple receivers to be scheduled with the same completion signatures, and when a completion signal is sent, it is broadcast to all scheduled receivers.

These are unregistered before they are completed, so they will only receive the first completion signal sent after they are scheduled.

Member Function Documentation

◆ set_error()

template<signature... S>
template<typename E >
void ecor::broadcast_source< S >::set_error ( E &&  err)
inline

Send a set_error signal to all scheduled receivers.

These are unregistered before the signal is sent, so they will only receive the first set_error signal sent after they are scheduled.

Passes the error as non-const reference.

◆ set_stopped()

template<signature... S>
void ecor::broadcast_source< S >::set_stopped ( )
inline

Send a set_stopped signal to all scheduled receivers.

These are unregistered before the signal is sent, so they will only receive the first set_stopped signal sent after they are scheduled.

◆ set_value()

template<signature... S>
template<typename... Args>
void ecor::broadcast_source< S >::set_value ( Args &&...  args)
inline

Send a set_value signal to all scheduled receivers.

These are unregistered before the signal is sent, so they will only receive the first set_value signal sent after they are scheduled.

Passes the arguments as non-const reference.


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