1use timely::dataflow::{InputHandle, ProbeHandle};
2use timely::dataflow::operators::{Inspect, Probe};
3use timely::WorkerConfig;
4
5fn main() {
6
7 let allocator = timely::communication::allocator::Thread::default();
9 let mut worker = timely::worker::Worker::new(WorkerConfig::default(), allocator, None);
10
11 let mut input = InputHandle::new();
13 let probe = ProbeHandle::new();
14
15 worker.dataflow(|scope| {
17 input
18 .to_stream(scope)
19 .container::<Vec<_>>()
20 .inspect(|x| println!("{:?}", x))
21 .probe_with(&probe);
22 });
23
24 for i in 0 .. 10 {
26 input.send(i);
27 input.advance_to(i);
28 while probe.less_than(input.time()) {
29 worker.step();
30 }
31 }
32}