pub fn activate(&self) -> (thread::JoinHandle<()>, thread::JoinHandle<()>) {
        // The listener threads, watches for incoming messages.
        let rcp_0: sync::Arc<sync::Mutex<Vec<String>>> = sync::Arc::clone(&self.peers);
        let msgs: sync::Arc<sync::Mutex<Vec<String>>> = sync::Arc::clone(&self.msgs);
        let ep_0: String = self.ep.clone();
        let ctxt_0: zmq::Context = self.ctxt.clone();
        let list_th = thread::spawn(move || {
            listen(ctxt_0, ep_0, rcp_0, msgs);
        });

        // Ping thread - assures reasonably consistency.
        let rcp_1: sync::Arc<sync::Mutex<Vec<String>>> = sync::Arc::clone(&self.peers);
        let ep_1: String = self.ep.clone();
        let ctxt_1: zmq::Context = self.ctxt.clone();
        let ping_th = thread::spawn(move || {
            ping(ctxt_1, ep_1, rcp_1);
        });
        (list_th, ping_th)
    }
/// Activate the agents - will start listener and mgmt. threads.
Activate the agents - will start listener and mgmt. threads.
Activate the agents - will start listener and mgmt . threads .
pub fn activate(&self) -> (thread::JoinHandle<()>, thread::JoinHandle<()>) {
        // The listener threads, watches for incoming messages.
        let rcp_0: sync::Arc<sync::Mutex<Vec<String>>> = sync::Arc::clone(&self.peers);
        let msgs: sync::Arc<sync::Mutex<Vec<String>>> = sync::Arc::clone(&self.msgs);
        let ep_0: String = self.ep.clone();
        let ctxt_0: zmq::Context = self.ctxt.clone();
        let list_th = thread::spawn(move || {
            listen(ctxt_0, ep_0, rcp_0, msgs);
        });
        // Ping thread - assures reasonably consistency.
        let rcp_1: sync::Arc<sync::Mutex<Vec<String>>> = sync::Arc::clone(&self.peers);
        let ep_1: String = self.ep.clone();
        let ctxt_1: zmq::Context = self.ctxt.clone();
        let ping_th = thread::spawn(move || {
            ping(ctxt_1, ep_1, rcp_1);
        });
        (list_th, ping_th)
    }
pub fn activate ( & self ) -> ( thread :: JoinHandle < ( ) > , thread :: JoinHandle < ( ) > ) { // The listener threads, watches for incoming messages. let rcp_0 : sync :: Arc < sync :: Mutex < Vec < String > > > = sync :: Arc :: clone ( & self . peers ) ; let msgs : sync :: Arc < sync :: Mutex < Vec < String > > > = sync :: Arc :: clone ( & self . msgs ) ; let ep_0 : String = self . ep . clone ( ) ; let ctxt_0 : zmq :: Context = self . ctxt . clone ( ) ; let list_th = thread :: spawn ( move | | { listen ( ctxt_0 , ep_0 , rcp_0 , msgs ) ; } ) ; // Ping thread - assures reasonably consistency. let rcp_1 : sync :: Arc < sync :: Mutex < Vec < String > > > = sync :: Arc :: clone ( & self . peers ) ; let ep_1 : String = self . ep . clone ( ) ; let ctxt_1 : zmq :: Context = self . ctxt . clone ( ) ; let ping_th = thread :: spawn ( move | | { ping ( ctxt_1 , ep_1 , rcp_1 ) ; } ) ; ( list_th , ping_th ) }
Activate the agents - will start listener and mgmt.
Activate the agents - will start listener and mgmt .
&self
&self