renamed actor api
This commit is contained in:
parent
7a40f1a8cd
commit
4efb212841
1 changed files with 2 additions and 4 deletions
|
|
@ -98,9 +98,7 @@ object Actor extends Logging {
|
|||
* The actor is started when created.
|
||||
* Example:
|
||||
* <pre>
|
||||
* import Actor._
|
||||
*
|
||||
* val a = actor {
|
||||
* val a = Actor.init {
|
||||
* ... // init stuff
|
||||
* } receive {
|
||||
* case msg => ... // handle message
|
||||
|
|
@ -108,7 +106,7 @@ object Actor extends Logging {
|
|||
* </pre>
|
||||
*
|
||||
*/
|
||||
def actor[A](body: => Unit) = {
|
||||
def init[A](body: => Unit) = {
|
||||
def handler[A](body: => Unit) = new {
|
||||
def receive(handler: PartialFunction[Any, Unit]) = new Actor() {
|
||||
start
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue