Trait timely::dataflow::operators::feedback::ConnectLoop [] [src]

pub trait ConnectLoop<G: ScopeParent, T: Timestamp, D: Data> {
    fn connect_loop(&self, _: Handle<G::Timestamp, T, D>);
}

Connect a Stream to the input of a loop variable.

Required Methods

Connect a Stream to be the input of a loop variable.

Examples

use timely::dataflow::operators::{LoopVariable, ConnectLoop, ToStream, Concat, Inspect};

timely::example(|scope| {
    // circulate 0..10 for 100 iterations.
    let (handle, cycle) = scope.loop_variable(100, 1);
    (0..10).to_stream(scope)
           .concat(&cycle)
           .inspect(|x| println!("seen: {:?}", x))
           .connect_loop(handle);
});

Implementors