@@ -12,7 +12,7 @@ use crate::scheduling::{Schedule, Activations};
1212
1313use crate :: progress:: { Source , Target } ;
1414use crate :: progress:: { Timestamp , Operate , operate:: SharedProgress , Antichain } ;
15- use crate :: progress:: operate:: { Connectivity , PortConnectivity } ;
15+ use crate :: progress:: operate:: { FrontierInterest , Connectivity , PortConnectivity } ;
1616use crate :: Container ;
1717use crate :: dataflow:: { Stream , Scope } ;
1818use crate :: dataflow:: channels:: pushers:: Tee ;
@@ -23,7 +23,7 @@ use crate::dataflow::operators::generic::operator_info::OperatorInfo;
2323#[ derive( Debug ) ]
2424pub struct OperatorShape {
2525 name : String , // A meaningful name for the operator.
26- notify : bool , // Does the operator require progress notifications .
26+ notify : Vec < FrontierInterest > , // Per-input frontier interest .
2727 peers : usize , // The total number of workers in the computation. Needed to initialize pointstamp counts with the correct magnitude.
2828 inputs : usize , // The number of input ports.
2929 outputs : usize , // The number of output ports.
@@ -34,7 +34,7 @@ impl OperatorShape {
3434 fn new ( name : String , peers : usize ) -> Self {
3535 OperatorShape {
3636 name,
37- notify : true ,
37+ notify : Vec :: new ( ) ,
3838 peers,
3939 inputs : 0 ,
4040 outputs : 0 ,
@@ -88,8 +88,10 @@ impl<G: Scope> OperatorBuilder<G> {
8888 /// Return a reference to the operator's shape
8989 pub fn shape ( & self ) -> & OperatorShape { & self . shape }
9090
91- /// Indicates whether the operator requires frontier information.
92- pub fn set_notify ( & mut self , notify : bool ) { self . shape . notify = notify; }
91+ /// Sets frontier interest for a specific input.
92+ pub fn set_notify_for ( & mut self , input : usize , notify : FrontierInterest ) {
93+ self . shape . notify [ input] = notify;
94+ }
9395
9496 /// Adds a new input to a generic operator builder, returning the `Pull` implementor to use.
9597 pub fn new_input < C : Container , P > ( & mut self , stream : Stream < G , C > , pact : P ) -> P :: Puller
@@ -113,6 +115,7 @@ impl<G: Scope> OperatorBuilder<G> {
113115 stream. connect_to ( target, sender, channel_id) ;
114116
115117 self . shape . inputs += 1 ;
118+ self . shape . notify . push ( FrontierInterest :: Always ) ;
116119 let connectivity: PortConnectivity < _ > = connection. into_iter ( ) . collect ( ) ;
117120 assert ! ( connectivity. iter_ports( ) . all( |( o, _) | o < self . shape. outputs) ) ;
118121 self . summary . push ( connectivity) ;
@@ -220,5 +223,5 @@ where
220223 ( self . summary . clone ( ) , Rc :: clone ( & self . shared_progress ) , self )
221224 }
222225
223- fn notify_me ( & self ) -> bool { self . shape . notify }
226+ fn notify_me ( & self ) -> & [ FrontierInterest ] { & self . shape . notify }
224227}
0 commit comments