in scala/concurrent
class MailBox

class MailBox()
extends Object
with ScalaObject
with ListQueueCreator
Implementing classes or objects:
class Actor()

Field Summary
  type Message

Method Summary
  def receive[a](f: PartialFunction[Object,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[Object,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: Object): Unit
     First check whether a pending receiver is applicable to the sent message.

Methods inherited from java/lang/Object-class
clone, eq, equals, finalize, getClass, hashCode, notify, notifyAll, synchronized, toString, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/concurrent/ListQueueCreator-class
queueCreate

Field Detail

Message

  type Message = Object
Method Detail

send

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

receive

  def receive[a](f: PartialFunction[Object,a]): a
Block until there is a message in the mailbox for which the processor f is defined.

receiveWithin

  def receiveWithin[a](msec: Long)(f: PartialFunction[Object,a]): a
Block until there is a message in the mailbox for which the processor f is defined or the timeout is over.