in scala.actors
object Actor

`object` Actor
  `extends` java.lang.Object
  `with` scala.ScalaObject

  The `Actor` object provides functions for the definition of actors, as well as all actor operations, such as `receive`, `react`, `reply`, etc.

Version:
  0.9.4
Author:
  Philipp Haller

Class Summary
`private` | `class` RecursiveProxyHandler

Trait Summary
`abstract` | `trait` Body [a]

Constructor Summary
| `def` this

Val Summary
| `val` tl : java.lang.ThreadLocal

Def Summary
| `def` ? : scala.Any Receives the next message from the mailbox of the current actor `self`.
| `def` actor (body: => scala.Unit) : scala.actors.Actor This function is used for the definition of actors. The following example demonstrates its usage:
       import scala.actors.Actor._
       ...
       val a = actor {
         ...
       }
| `def` eventloop (f: scala.PartialFunction[scala.Any, scala.Unit]) : scala.Nothing
| `def` exit (reason: java.lang.Object) : scala.Nothing Terminates execution of `self` with the following effect on linked actors: For each linked actor `a` with `trapExit` set to `true`, send message `{'EXIT, self, reason}` to `a`. For each linked actor `a` with `trapExit` set to `false` (default), call `a.exit(reason)` if `reason != 'normal`.
| `def` link (body: => scala.Unit) : scala.actors.Actor Links `self` to actor defined by `body`.
| `def` link (to: scala.actors.Actor) : scala.actors.Actor Links `self` to actor `to`.
| `def` loop (body: => scala.Unit) : scala.Nothing Causes `self` to repeatedly execute `body`.
`implicit` | `def` mkBody [a] (body: => a) : java.lang.Object with Actor.this.Body[a]
| `def` react (f: scala.PartialFunction[scala.Any, scala.Unit]) : scala.Nothing Lightweight variant of `receive`. Actions in `f` have to contain the rest of the computation of `self`, as this method will never return.
| `def` reactWithin (msec: scala.Long)(f: scala.PartialFunction[scala.Any, scala.Unit]) : scala.Nothing Lightweight variant of `receiveWithin`. Actions in `f` have to contain the rest of the computation of `self`, as this method will never return.
| `def` receive [a] (f: scala.PartialFunction[scala.Any, a]) : a Receives a message from the mailbox of `self`. Blocks if no message matching any of the cases of `f` can be received.
| `def` receiveWithin [R] (msec: scala.Long)(f: scala.PartialFunction[scala.Any, R]) : R Receives a message from the mailbox of `self`. Blocks at most `msec` milliseconds if no message matching any of the cases of `f` can be received. If no message could be received the `TIMEOUT` action is executed if specified.
| `def` reply : scala.Unit Send `()` to the actor waiting in a call to `!?`.
| `def` reply (msg: scala.Any) : scala.Unit Send `msg` to the actor waiting in a call to `!?`.
| `def` self : scala.actors.Actor Returns the currently executing actor. Should be used instead of `this` in all blocks of code executed by actors.
| `def` sender : scala.actors.Actor Returns the actor which sent the last received message.
| `def` seq [a, b] (first: => a, next: => b) : scala.Nothing Causes `self` to execute `first` followed by `next`.
| `def` unlink (from: scala.actors.Actor) : scala.Unit Unlinks `self` from actor `from`.

Trait Detail

`abstract trait` Body [a]
  `extends` java.lang.Object
  `with` scala.ScalaObject

Def Summary
`abstract` | `def` andThen [b] (other: => b) : scala.Nothing

Def Detail

`abstract def` andThen [b](other: => b): scala.Nothing

Constructor Detail

`def` this

Val Detail

`val` tl : java.lang.ThreadLocal

Def Detail

`def` ? : scala.Any

  Receives the next message from the mailbox of the current actor `self`.

`def` actor (body: => scala.Unit): scala.actors.Actor

  This function is used for the definition of actors.

  The following example demonstrates its usage:

         import scala.actors.Actor._
         ...
         val a = actor {
           ...
         }

Parameters:
  `body -` the code block to be executed by the newly created actor
Returns:
  the newly created actor. Note that it is automatically started.

`def` eventloop (f: scala.PartialFunction[scala.Any, scala.Unit]): scala.Nothing

`def` exit (reason: java.lang.Object): scala.Nothing

  Terminates execution of `self` with the following effect on linked actors:

  For each linked actor `a` with `trapExit` set to `true`, send message `{'EXIT, self, reason}` to `a`.

  For each linked actor `a` with `trapExit` set to `false` (default), call `a.exit(reason)` if `reason != 'normal`.

`def` link (body: => scala.Unit): scala.actors.Actor

  Links `self` to actor defined by `body`.

Parameters:
  `body -` ...
Returns:
  ...

`def` link (to: scala.actors.Actor): scala.actors.Actor

  Links `self` to actor `to`.

Parameters:
  `to -` the actor to link to
Returns:

`def` loop (body: => scala.Unit): scala.Nothing

  Causes `self` to repeatedly execute `body`.

Parameters:
  `body -` the code block to be executed

`implicit def` mkBody [a](body: => a): java.lang.Object with Actor.this.Body[a]

`def` react (f: scala.PartialFunction[scala.Any, scala.Unit]): scala.Nothing

  Lightweight variant of `receive`. Actions in `f` have to contain the rest of the computation of `self`, as this method will never return.

Parameters:
  `f -` a partial function specifying patterns and actions
Returns:
  this function never returns

`def` reactWithin (msec: scala.Long)(f: scala.PartialFunction[scala.Any, scala.Unit]): scala.Nothing

  Lightweight variant of `receiveWithin`. Actions in `f` have to contain the rest of the computation of `self`, as this method will never return.

Parameters:
  `msec -` the time span before timeout
Parameters:
  `f -` a partial function specifying patterns and actions
Returns:
  this function never returns

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

  Receives a message from the mailbox of `self`. Blocks if no message matching any of the cases of `f` can be received.

Parameters:
  `f -` a partial function specifying patterns and actions
Returns:
  the result of processing the received message

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

  Receives a message from the mailbox of `self`. Blocks at most `msec` milliseconds if no message matching any of the cases of `f` can be received. If no message could be received the `TIMEOUT` action is executed if specified.

Parameters:
  `msec -` the time span before timeout
Parameters:
  `f -` a partial function specifying patterns and actions
Returns:
  the result of processing the received message

`def` reply : scala.Unit

  Send `()` to the actor waiting in a call to `!?`.

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

  Send `msg` to the actor waiting in a call to `!?`.

`def` self : scala.actors.Actor

  Returns the currently executing actor. Should be used instead of `this` in all blocks of code executed by actors.

Returns:
  returns the currently executing actor.

`def` sender : scala.actors.Actor

  Returns the actor which sent the last received message.

`def` seq [a, b](first: => a, next: => b): scala.Nothing

  Causes `self` to execute `first` followed by `next`.

Parameters:
  `first -` the first code block to be executed
Parameters:
  `next -` the second code block to be executed

`def` unlink (from: scala.actors.Actor): scala.Unit

  Unlinks `self` from actor `from`.

Parameters:
  `from -` the actor to unlink from