pub fn execute_from<T, F>(
builders: Vec<AllocatorBuilder>,
others: Box<dyn Any + Send>,
worker_config: WorkerConfig,
func: F,
) -> Result<WorkerGuards<T>, String>Expand description
Executes a timely dataflow from supplied allocators and logging.
Refer to execute for more details.
use timely::dataflow::operators::{ToStream, Inspect};
use timely::WorkerConfig;
// execute a timely dataflow using command line parameters
let (builders, other) = timely::CommunicationConfig::Process(3).try_build().unwrap();
timely::execute::execute_from(builders, other, WorkerConfig::default(), |worker| {
worker.dataflow::<(),_,_>(|scope| {
(0..10).to_stream(scope)
.container::<Vec<_>>()
.inspect(|x| println!("seen: {:?}", x));
})
}).unwrap();