/// The method starts the processing of messages in the `PeerFlowQueueMap`.
The method starts the processing of messages in the `PeerFlowQueueMap`.
The method starts the processing of messages in the ` PeerFlowQueueMap ` .
fn start<F>(&self, fn_consume_message: F)
    where
        F: Fn(T, NodeId) + Clone + Send + 'static,
    {
        let mgmt_cmd_receive = self
            .management_command_receiver
            .lock()
            .unwrap()
            .take()
            .unwrap();
        let recv_task_handle = self.rt_handle.spawn_blocking(move || {
            tokio::runtime::Handle::current().block_on(async move {
                Self::process_messages(mgmt_cmd_receive, fn_consume_message).await;
            });
        });
        self.receive_task_handle
            .lock()
            .unwrap()
            .replace(recv_task_handle)
            .ok_or(0)
            .expect_err("Handler already started");
    }
fn start < F > ( & self , fn_consume_message : F ) where F : Fn ( T , NodeId ) + Clone + Send + ' static , { let mgmt_cmd_receive = self . management_command_receiver . lock ( ) . unwrap ( ) . take ( ) . unwrap ( ) ; let recv_task_handle = self . rt_handle . spawn_blocking ( move | | { tokio :: runtime :: Handle :: current ( ) . block_on ( async move { Self :: process_messages ( mgmt_cmd_receive , fn_consume_message ) . await ; } ) ; } ) ; self . receive_task_handle . lock ( ) . unwrap ( ) . replace ( recv_task_handle ) . ok_or ( 0 ) . expect_err ( " " ) ; }
The method starts the processing of messages in the `PeerFlowQueueMap`.
The method starts the processing of messages in the ` PeerFlowQueueMap ` .
&self
fn_consume_message
F