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

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

Connect a Stream to the input of a loop variable.

Required methods

fn connect_loop(&self, _: Handle<G, D>)[src]

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

Examples

use timely::dataflow::Scope;
use timely::dataflow::operators::{Feedback, ConnectLoop, ToStream, Concat, Inspect, BranchWhen};

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

Implementors

impl<G: Scope, D: Data> ConnectLoop<G, D> for Stream<G, D>[src]

Loading content...