pub fn new(raft: Raft) -> Node {
        // Your code here.
        let rf = Arc::new(raft);
        let clone = rf.clone();
        thread::spawn(move || {
            clone.start_event_loop();
        });
        Self { raft: rf }
    }
/// Create a new raft service.
Create a new raft service.
Create a new raft service .
pub fn new(raft: Raft) -> Node {
        // Your code here.
        let rf = Arc::new(raft);
        let clone = rf.clone();
        thread::spawn(move || {
            clone.start_event_loop();
        });
        Self { raft: rf }
    }
pub fn new ( raft : Raft ) -> Node { // Your code here. let rf = Arc :: new ( raft ) ; let clone = rf . clone ( ) ; thread :: spawn ( move | | { clone . start_event_loop ( ) ; } ) ; Self { raft : rf } }
Create a new raft service.
Create a new raft service .
raft
Raft