concept mailbox in category java

appears as: mailboxes, mailbox
The Well-Grounded Java Developer

This is an excerpt from Manning's book The Well-Grounded Java Developer.

Figure 9.5. Scala actors and mailboxes

On the receiving end, however, you need some code to handle the messages or they’ll just pile up in the mailbox. In addition, the body of the actor method usually needs to loop, so that it can handle an entire stream of incoming messages. Let’s see some of this in action at the Scala REPL: