/* * called by OtpNode to deliver message to this mailbox. * * About exit and exit2: both cause exception to be raised upon * receive(). However exit (not 2) causes any link to be removed as * well, while exit2 leaves any links intact. */ internal virtual void deliver(OtpMsg m) { switch (m.type()) { case OtpMsg.Tag.linkTag: links.addLink(_self, m.getSenderPid()); break; case OtpMsg.Tag.unlinkTag: links.removeLink(_self, m.getSenderPid()); break; case OtpMsg.Tag.exitTag: links.removeLink(_self, m.getSenderPid()); queue.put(m); break; case OtpMsg.Tag.monitorPTag: monitors[m.getSenderPid()] = m.getMsg(); break; case OtpMsg.Tag.demonitorPTag: monitors.Remove(m.getSenderPid()); break; case OtpMsg.Tag.monitorPexitTag: queue.put(m); break; case OtpMsg.Tag.exit2Tag: default: queue.put(m); break; } }
public override void deliver(System.Exception e) { queue.put(e); }