pub fn attach(self, worker: &Worker<Generic>) {
        // if there's already a logger attached, we won't override it
        if let Err(_) = ::std::env::var("TIMELY_WORKER_LOG_ADDR") {
            let timely_logger = Rc::new(RefCell::new(self));

            // TODO: Merge events aren't guaranteed to be picked up early enough
            // so that they're assigned to the correct SchedulesEvent.
            // They are generated at the "right" time, but there exists a race
            // condition due to the way we read out timely & differential events in `attach`.
            // For this reason, we currently don't add arrangement information.
            // let differential_logger = timely_logger.clone();
            // worker
            //     .log_register()
            //     .insert::<DifferentialEvent, _>("differential/arrange", move |_time, data| {
            //         differential_logger.borrow_mut().publish_batch(DataflowEvents::Differential(data));
            //     });

            worker
                .log_register()
                .insert::<TimelyEvent, _>("timely", move |_time, data| {
                    timely_logger.borrow_mut().publish_batch(DataflowEvents::Timely(data));
                });
        }
    }
/// Redirects all events from the `TimelyEvent` logger to self.
Redirects all events from the `TimelyEvent` logger to self.
Redirects all events from the ` TimelyEvent ` logger to self .
pub fn attach(self, worker: &Worker<Generic>) {
        // if there's already a logger attached, we won't override it
        if let Err(_) = ::std::env::var("TIMELY_WORKER_LOG_ADDR") {
            let timely_logger = Rc::new(RefCell::new(self));
            // TODO: Merge events aren't guaranteed to be picked up early enough
            // so that they're assigned to the correct SchedulesEvent.
            // They are generated at the "right" time, but there exists a race
            // condition due to the way we read out timely & differential events in `attach`.
            // For this reason, we currently don't add arrangement information.
            // let differential_logger = timely_logger.clone();
            // worker
            //     .log_register()
            //     .insert::<DifferentialEvent, _>("differential/arrange", move |_time, data| {
            //         differential_logger.borrow_mut().publish_batch(DataflowEvents::Differential(data));
            //     });
            worker
                .log_register()
                .insert::<TimelyEvent, _>("timely", move |_time, data| {
                    timely_logger.borrow_mut().publish_batch(DataflowEvents::Timely(data));
                });
        }
    }
pub fn attach ( self , worker : & Worker < Generic > ) { // if there's already a logger attached, we won't override it if let Err ( _ ) = :: std :: env :: var ( " " ) { let timely_logger = Rc :: new ( RefCell :: new ( self ) ) ; // TODO: Merge events aren't guaranteed to be picked up early enough // so that they're assigned to the correct SchedulesEvent. // They are generated at the "right" time, but there exists a race // condition due to the way we read out timely & differential events in `attach`. // For this reason, we currently don't add arrangement information. // let differential_logger = timely_logger.clone(); // worker //     .log_register() //     .insert::<DifferentialEvent, _>("differential/arrange", move |_time, data| { //         differential_logger.borrow_mut().publish_batch(DataflowEvents::Differential(data)); //     }); worker . log_register ( ) . insert :: < TimelyEvent , _ > ( " " , move | _time , data | { timely_logger . borrow_mut ( ) . publish_batch ( DataflowEvents :: Timely ( data ) ) ; } ) ; } }
Redirects all events from the `TimelyEvent` logger to self.
Redirects all events from the ` TimelyEvent ` logger to self .
self
worker
&Worker<Generic>
self
worker
&Worker<Generic>