Function timely::execute::execute_from_args_logging
[−]
[src]
pub fn execute_from_args_logging<I, T, F>(
iter: I,
logging_config: LoggerConfig,
func: F
) -> Result<WorkerGuards<T>, String> where
I: Iterator<Item = String>,
T: Send + 'static,
F: Fn(&mut Root<Allocator>) -> T + Send + Sync + 'static,
Executes a timely dataflow from supplied arguments and per-communicator logic.
Refer to execute_from_args
for more details. This function additionally
supports providing a logging configuration.
use timely::dataflow::operators::{ToStream, Inspect}; use timely::logging::{LoggerConfig, EventPusherTee}; let logger_config = LoggerConfig::new( |_setup| EventPusherTee::new() /* setup logging destinations */, |_setup| EventPusherTee::new() /* setup logging destinations */); // execute a timely dataflow using command line parameters timely::execute_from_args_logging(std::env::args(), logger_config, |worker| { worker.dataflow::<(),_,_>(|scope| { (0..10).to_stream(scope) .inspect(|x| println!("seen: {:?}", x)); }) }).unwrap();