module Earl::Mailbox(M)
Overview
Extends an agent with a mailbox that receives messages of type M
.
NOTE agents must use the #receive : M
and #receive? : M?
methods to
take messages from the mailbox —undocumented because they're protected
.
Direct including types
Defined in:
mailbox.crInstance Method Summary
-
#mailbox=(mailbox : Channel(M)) : Channel(M)
Replaces the mailbox.
-
#send(message : M) : Nil
Send a message to the
Agent
.
Instance Method Detail
def mailbox=(mailbox : Channel(M)) : Channel(M)
#
Replaces the mailbox. The mailbox won't be closed automatically when the agent is asked to stop.