|
tin
1.5.9
|
#include <actor.h>

Public Types | |
| using | event_type = typename Source::event_type |
| Event type transferred by this link. More... | |
Public Member Functions | |
| constexpr | actor_link (Source &source, Sink &sink) |
| bool | step () |
| bool | pending () const noexcept |
| Report whether the link is holding one value for retry. More... | |
Typed handoff between one output port and one input port.
actor_link offers at most one value per step(). If the source produces a value but the sink rejects it, the link keeps that value in one pending slot and retries it on a later step.
| using tsm::runtime::actor_link< Source, Sink >::event_type = typename Source::event_type |
Event type transferred by this link.
|
inlineconstexpr |
Bind the link to an existing source port and sink port.
The link is non-owning. The referenced ports must outlive the link.
|
inlinenoexcept |
Report whether the link is holding one value for retry.
|
inline |
Try to offer one value from source to sink.
Returns true when a pending value is accepted by the sink or when a new source value is received and accepted. Returns false when no source value is available or the sink still rejects the pending value.