// The heartbeat function is called periodically
The heartbeat function is called periodically
The heartbeat function is called periodically
pub fn heartbeat(&self) {
        for component in self.active_components.values() {
            // It's okay not to block on the lock -- heartbeats have no guaranteed periodicity
            // (Plus, this is only used for component shutdown, if someone has this lock, the
            // component  is clearly still in use)
            if let Some(mut handle) = component.try_lock() {
                handle.heartbeat()
            }
        }
    }
pub fn heartbeat ( & self ) { for component in self . active_components . values ( ) { // It's okay not to block on the lock -- heartbeats have no guaranteed periodicity // (Plus, this is only used for component shutdown, if someone has this lock, the // component  is clearly still in use) if let Some ( mut handle ) = component . try_lock ( ) { handle . heartbeat ( ) } } }
The heartbeat function is called periodically
The heartbeat function is called periodically
&self