eengbrec / Scala Enhancements

In-progress enhancements to the Scala standard library, mostly centered around actors.

commit 115: 24c0eb1f167b
parent 97: 26ae498dfea0
branch: actor_state_machine
added interop test that fails to shutdown due to link problem but otherwise works
eengbrec
9 months ago
r115:24c0eb1f167b 47 loc 1.4 KB embed / history / annotate / raw /
/*                     __                                               *\
**     ________ ___   / /  ___     Scala API                            **
**    / __/ __// _ | / /  / _ |    (c) 2005-2009, LAMP/EPFL             **
**  __\ \/ /__/ __ |/ /__/ __ |    http://scala-lang.org/               **
** /____/\___/_/ |_/____/_/ | |                                         **
**                          |/                                          **
\*                                                                      */

// $Id$

package scala.actors

/**
 * The <code>AbstractActor</code> trait.
 *
 * @version 0.9.18
 * @author Philipp Haller
 * @author Erik Engbrecht
 */
trait AbstractActor extends OutputChannel[Any] {

  /*protected[actors]*/ var exiting = false //TODO: make exiting a def
  //TODO: remove when package qualification on protected is fixed
  private[actors] final def exitingForActors = exiting

  /**
   * @todo make linkTo protected instead of private
   */
  /*protected[actors]*/ def linkTo(to: AbstractActor): Unit
  /**
   * @todo make unlinkFrom protected instead of private
   */
  /*protected[actors]*/ def unlinkFrom(from: AbstractActor): Unit

  /**
   * @todo make exit protected instead of private
   */
  /*protected[actors]*/ def exit(from: AbstractActor, reason: Any): Unit

  def !?(msg: Any): Any

  def !?(msec: Long, msg: Any): Option[Any]

  def !!(msg: Any): Future[Any]

  def !![A](msg: Any, f: PartialFunction[Any, A]): Future[A]
}