scala.concurrent
class MailBox

[source: `scala/concurrent/MailBox.scala`]

`` `class` MailBox
  `extends` ListQueueCreator

  This class ...

Author
  Martin Odersky
Version
  1.0, 12/03/2003

Type Summary
`type` | Message

Method Summary
`def` | receive [a](f : PartialFunction[AnyRef, a]) : a Block until there is a message in the mailbox for which the processor `f` is defined.
`def` | receiveWithin [a](msec : Long)(f : PartialFunction[AnyRef, 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 : AnyRef) : 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.

Methods inherited from ListQueueCreator
queueCreate

Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized

Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

Type Details

`` `type` Message

Method Details

`` `def` send(msg : AnyRef) : 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.

`` `def` receive[a](f : PartialFunction[AnyRef, a]) : a

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

`` `def` receiveWithin[a](msec : Long)(f : PartialFunction[AnyRef, a]) : a

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