pub fn exit(&self) {
        self.exit.store(true, Ordering::Relaxed);
        if let Some(ref rpc_service) = self.rpc_service {
            rpc_service.exit();
        }
        if let Some(ref rpc_pubsub_service) = self.rpc_pubsub_service {
            rpc_pubsub_service.exit();
        }
        match self.node_role {
            Some(NodeRole::Leader(ref leader_services)) => leader_services.exit(),
            Some(NodeRole::Validator(ref validator_services)) => validator_services.exit(),
            _ => (),
        }
    }
//used for notifying many nodes in parallel to exit
used for notifying many nodes in parallel to exit
used for notifying many nodes in parallel to exit
pub fn exit(&self) {
        self.exit.store(true, Ordering::Relaxed);
        if let Some(ref rpc_service) = self.rpc_service {
            rpc_service.exit();
        }
        if let Some(ref rpc_pubsub_service) = self.rpc_pubsub_service {
            rpc_pubsub_service.exit();
        }
        match self.node_role {
            Some(NodeRole::Leader(ref leader_services)) => leader_services.exit(),
            Some(NodeRole::Validator(ref validator_services)) => validator_services.exit(),
            _ => (),
        }
    }
pub fn exit ( & self ) { self . exit . store ( true , Ordering :: Relaxed ) ; if let Some ( ref rpc_service ) = self . rpc_service { rpc_service . exit ( ) ; } if let Some ( ref rpc_pubsub_service ) = self . rpc_pubsub_service { rpc_pubsub_service . exit ( ) ; } match self . node_role { Some ( NodeRole :: Leader ( ref leader_services ) ) => leader_services . exit ( ) , Some ( NodeRole :: Validator ( ref validator_services ) ) => validator_services . exit ( ) , _ => ( ) , } }
used for notifying many nodes in parallel to exit
used for notifying many nodes in parallel to exit
&self
&self