Turi Create
4.0
|
#include <ml/neural_net/combine_base.hpp>
Public Types | |
using | Input = T |
Public Member Functions | |
virtual void | Receive (std::shared_ptr< Subscription > subscription)=0 |
virtual Demand | Receive (Input element)=0 |
virtual void | Receive (Completion completion)=0 |
Interface for objects that consume values from a Publisher.
Unless otherwise specified by the concrete implementation, external synchronization must be used to avoid concurrent calls the Subscriber interface from different threads.
Definition at line 158 of file combine_base.hpp.
using turi::neural_net::Subscriber< T >::Input = T |
The type of the values that this Subscriber consumes.
Definition at line 161 of file combine_base.hpp.
|
pure virtual |
The first signal that a Subscriber receives from a Publisher, passing the Subscription that the Subscriber can use to control the flow of values.
A Subscriber may only have one Publisher. If it somehow receives more than one Subscription, it should call Subscription::Cancel() on any instances received after the first.
A Subscriber is explictly allowed to demand values synchronously from within its implementation of this method.
Implemented in turi::neural_net::FuturesSubscriber< T >.
|
pure virtual |
Transmits a value from the Publisher to this Subscriber.
A Subcriber should never receive more calls to this method than the total Demand it has requested from its publisher. Subscribers should only demand more elements from within this method via its return value.
Implemented in turi::neural_net::FuturesSubscriber< T >.
|
pure virtual |
Signals completion of the stream of values from the Publisher.
A Subscriber should not receive any further signals of any kind after receiving a Completion.
Implemented in turi::neural_net::FuturesSubscriber< T >.