Function timely::execute::execute_from [−][src]
pub fn execute_from<A, T, F>(
builders: Vec<A>,
others: Box<Any>,
func: F
) -> Result<WorkerGuards<T>, String> where
A: AllocateBuilder + 'static,
T: Send + 'static,
F: Fn(&mut Worker<<A as AllocateBuilder>::Allocator>) -> T + Send + Sync + 'static,
Executes a timely dataflow from supplied allocators and logging.
Refer to execute
for more details.
use timely::dataflow::operators::{ToStream, Inspect}; // execute a timely dataflow using command line parameters let (builders, other) = timely::Configuration::Process(3).try_build().unwrap(); timely::execute::execute_from(builders, other, |worker| { worker.dataflow::<(),_,_>(|scope| { (0..10).to_stream(scope) .inspect(|x| println!("seen: {:?}", x)); }) }).unwrap();