public void InEvent() { while (true) { // Get the next command. If there is none, exit. Command command; if (!m_mailbox.TryRecv(0, out command)) break; // Process the command. command.Destination.ProcessCommand(command); } }