Turi Create  4.0
turi::neural_net::Subscription Class Referenceabstract

#include <ml/neural_net/combine_base.hpp>

Public Member Functions

virtual void Cancel ()=0
 
virtual void Request (Demand demand)=0
 

Detailed Description

Interface for objects that Publishers send to Subscribers to allow the Subscribers to (potentially asynchronously) control the flow of values that the Subscriber receives from the Publisher.

Definition at line 95 of file combine_base.hpp.

Member Function Documentation

◆ Cancel()

virtual void turi::neural_net::Subscription::Cancel ( )
pure virtual

Requests the Publisher to stop sending anything to the Subscriber.

After receiving Cancel() from a Subscriber, a Publisher should thereafter ignore all future messages from that Subscriber, including future calls to Cancel.

Publishers must support Subscribers calling Cancel() from inside Subscriber::Receive(...).

◆ Request()

virtual void turi::neural_net::Subscription::Request ( Demand  demand)
pure virtual

Requests the Publisher to send the indicated number of values to the Subscriber.

Publishers must support Subscribers calling Request(Demand) from inside Subscriber::Receive(Subscription), but Subscribers should avoid calling Request(Demand) inside Subscriber::Receive(Input). Instead, they should send additional Demand via the return value of Subscriber::Receive(Input) (to help prevent infinite recursion).


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