in scala.actors.threads
class MailBox

`class` MailBox
  `extends` java.lang.Object
  `with` scala.actors.threads.ListQueueCreator
  `with` scala.ScalaObject

  The class `MailBox` ...

author:
  Martin Odersky
version:
  1.0

Constructor Summary
| `def` this

Type Summary
| `type` Message

Class Summary
`abstract` `private` | `class` PreReceiver
`private` | `class` Receiver [ a ]

Def Summary
| `def` receive [ a ] ( f : scala.PartialFunction[scala.Any,a] ) : a Block until there is a message in the mailbox for which the processor `f` is defined.
| `def` receiveWithin [ a ] ( msec : scala.Long ) ( f : scala.PartialFunction[scala.Any,a] ) : a Block until there is a message in the mailbox for which the processor `f` is defined or the timeout is over.
| `def` send ( msg : scala.Any ) : scala.Unit First check whether a pending receiver is applicable to the sent message. If yes, the receiver is notified. Otherwise the message is appended to the linked list of sent messages.

Constructor Detail

`def` this

Type Detail

`type` Message

Def Detail

`def` receive [ a ]( f : scala.PartialFunction[scala.Any,a] ) : a

  Block until there is a message in the mailbox for which the processor `f` is defined.

`def` receiveWithin [ a ]( msec : scala.Long ) ( f : scala.PartialFunction[scala.Any,a] ) : a

  Block until there is a message in the mailbox for which the processor `f` is defined or the timeout is over.

`def` send ( msg : scala.Any ) : scala.Unit

  First check whether a pending receiver is applicable to the sent message. If yes, the receiver is notified. Otherwise the message is appended to the linked list of sent messages.