pub fn send_command_blocking(&self, payload: CommandData) -> ReplyPayload {
        with_current_thread(|t| {
            // Blocks the thread, sends the command and notifies the receiving thread.
            {
                preempt_disable();
                let _block_guard = ThreadBlockGuard::activate();
                //self.a.lock().insert(t.id, t.clone());
                t.set_ipc_blocked_on(self.id);
                self.command_queue.push_back(Command {
                    payload,
                    thread_id: t.id,
                });
                preempt_enable();
            }

            t.set_ipc_blocked_on(SchemeId::sentinel());

            // Response to sender comes here.
            ReplyPayload::from(&t.reply)
        })
    }
/// Sends a blocking IPC message to the scheme.
Sends a blocking IPC message to the scheme.
Sends a blocking IPC message to the scheme .
pub fn send_command_blocking(&self, payload: CommandData) -> ReplyPayload {
        with_current_thread(|t| {
            // Blocks the thread, sends the command and notifies the receiving thread.
            {
                preempt_disable();
                let _block_guard = ThreadBlockGuard::activate();
                //self.a.lock().insert(t.id, t.clone());
                t.set_ipc_blocked_on(self.id);
                self.command_queue.push_back(Command {
                    payload,
                    thread_id: t.id,
                });
                preempt_enable();
            }
            t.set_ipc_blocked_on(SchemeId::sentinel());
            // Response to sender comes here.
            ReplyPayload::from(&t.reply)
        })
    }
pub fn send_command_blocking ( & self , payload : CommandData ) -> ReplyPayload { with_current_thread ( | t | { // Blocks the thread, sends the command and notifies the receiving thread. { preempt_disable ( ) ; let _block_guard = ThreadBlockGuard :: activate ( ) ; //self.a.lock().insert(t.id, t.clone()); t . set_ipc_blocked_on ( self . id ) ; self . command_queue . push_back ( Command { payload , thread_id : t . id , } ) ; preempt_enable ( ) ; } t . set_ipc_blocked_on ( SchemeId :: sentinel ( ) ) ; // Response to sender comes here. ReplyPayload :: from ( & t . reply ) } ) }
Sends a blocking IPC message to the scheme.
Sends a blocking IPC message to the scheme .
&self
payload
CommandData
&self
payload
CommandData