Skip to main content

Handle

Type Alias Handle 

Source
pub type Handle<T, D> = HandleCore<T, Vec<D>>;
Expand description

A handle specialized to vector-based containers.

Aliased Type§

pub struct Handle<T, D> { /* private fields */ }

Implementations§

Source§

impl<T: Timestamp, D: Data> Handle<T, D>

Source

pub fn send(&mut self, data: D)

Sends one record into the corresponding timely dataflow Stream, at the current epoch.

§Examples
use timely::*;
use timely::dataflow::operators::{Input, Inspect};
use timely::dataflow::operators::input::Handle;

// construct and execute a timely dataflow
timely::execute(Config::thread(), |worker| {

    // add an input and base computation off of it
    let mut input = Handle::new();
    worker.dataflow(|scope| {
        scope.input_from(&mut input)
             .inspect(|x| println!("hello {:?}", x));
    });

    // introduce input, advance computation
    for round in 0..10 {
        input.send(round);
        input.advance_to(round + 1);
        worker.step();
    }
});

Trait Implementations§

Source§

impl<T: Timestamp, D: Data> Default for Handle<T, D>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more