MailboxMessage

Inherits from: Object
Instance variables: sender, selector, payload

A message received from a process mailbox. Each MailboxMessage wraps a payload value with optional metadata about the sender and message selector.

MailboxMessages are created automatically by Process>>send: and Process>>send:with:. They are received by Process receive, Process receive:, Process tryReceive, and Process receiveMatching:.

Example
| p <Process> |
p := [Process receive payload] fork.
Process sleep: 10.
p send: 42.
p wait
Example
| p <Process> |
p := [Process receive selector] fork.
Process sleep: 10.
p send: #doWork with: 'data'.
p wait

Instance Methods

uncategorized

payload

The payload value of the message.

printString

Return a string representation of the message.

selector

The message selector (a Symbol), or nil if none was specified (raw send).

sender

The process that sent this message, or nil for remote or system messages.