Struct timely::dataflow::operators::OutputHandle
[−]
[src]
pub struct OutputHandle<'a, T: Timestamp, D: 'a, P: Push<(T, Content<D>)> + 'a> { // some fields omitted }
Handle to an operator's output stream.
Methods
impl<'a, T: Timestamp, D, P: Push<(T, Content<D>)>> OutputHandle<'a, T, D, P>
[src]
fn session<'b>(&'b mut self, cap: &Capability<T>) -> Session<'b, T, D, PushCounter<T, D, P>> where 'a: 'b
Obtains a session that can send data at the timestamp associated with capability cap
.
In order to send data at a future timestamp, obtain a capability for the new timestamp first, as show in the example.
Examples
use timely::dataflow::operators::{ToStream, Unary}; use timely::dataflow::channels::pact::Pipeline; timely::example(|scope| { (0..10).to_stream(scope) .unary_stream(Pipeline, "example", |input, output| { while let Some((cap, data)) = input.next() { let mut time = cap.time(); time.inner += 1; output.session(&cap.delayed(&time)).give_content(data); } }); });