Trait timely::dataflow::operators::probe::Probe
[−]
[src]
pub trait Probe<G: Scope, D: Data> { fn probe(&self) -> (Handle<G::Timestamp>, Stream<G, D>); }
Monitors progress at a Stream
.
Required Methods
fn probe(&self) -> (Handle<G::Timestamp>, Stream<G, D>)
Constructs a progress probe which indicates which timestamps have elapsed at the operator.
Examples
use timely::*; use timely::dataflow::Scope; use timely::dataflow::operators::{Input, Probe, Inspect}; use timely::progress::timestamp::RootTimestamp; // construct and execute a timely dataflow timely::execute(Configuration::Thread, |root| { // add an input and base computation off of it let (mut input, probe) = root.scoped(|scope| { let (input, stream) = scope.new_input(); let (probe, stream) = stream.inspect(|x| println!("hello {:?}", x)) .probe(); (input, probe) }); // introduce input, advance computation for round in 0..10 { input.send(round); input.advance_to(round + 1); while probe.le(&RootTimestamp::new(round)) { root.step(); } } }).unwrap();