This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Actors syntax in 2.8

3 replies
Java Artisan
Joined: 2010-07-20,
User offline. Last seen 2 years 15 weeks ago.
Hello,
It seems actors have been reworked extensively in 2.8. Does this also imply a different language syntax compared to 2.7.2 ?
If so, can somebody point me to documentation of how this is done ?
Many thanks !!!
Jan
Chris Marshall
Joined: 2009-06-17,
User offline. Last seen 44 weeks 3 days ago.
RE: Actors syntax in 2.8
I have upgraded a number of actor-based projects from 2.7 to 2.8 with only one gotcha: the Actor.loop is now an instance method and hence must be called self.loop when you are using it in an actor-within-an-actor. Also, calls to mailboxSize are no longer allowed except from the actor itself (or subclasses thereof).
This was an extremely smooth transition

Chris

From: java.artisan@gmail.com
Date: Tue, 20 Jul 2010 17:50:58 +0200
Subject: [scala-user] Actors syntax in 2.8
To: scala-user@listes.epfl.ch

Hello,
It seems actors have been reworked extensively in 2.8. Does this also imply a different language syntax compared to 2.7.2 ?
If so, can somebody point me to documentation of how this is done ?
Many thanks !!!
Jan
Get a new e-mail account with Hotmail - Free. Sign-up now.
Java Artisan
Joined: 2010-07-20,
User offline. Last seen 2 years 15 weeks ago.
Re: Actors syntax in 2.8
Hi Chris,
Ok. Nothing fundamentally changed in the syntax and only under the hood ? Any performance differences ?
Sorry for the obvious question but I struggled through "Programming in Scala" and was about to start for a personal project with actors - agent-based simulations actually. I was worried what 2.8 had changed it all over. :-)
Thanks !
Jan

On Tue, Jul 20, 2010 at 19:08, christopher marshall <oxbow_lakes@hotmail.com> wrote:
I have upgraded a number of actor-based projects from 2.7 to 2.8 with only one gotcha: the Actor.loop is now an instance method and hence must be called self.loop when you are using it in an actor-within-an-actor. Also, calls to mailboxSize are no longer allowed except from the actor itself (or subclasses thereof).
This was an extremely smooth transition

Chris

From: java.artisan@gmail.com
Date: Tue, 20 Jul 2010 17:50:58 +0200
Subject: [scala-user] Actors syntax in 2.8
To: scala-user@listes.epfl.ch

Hello,
It seems actors have been reworked extensively in 2.8. Does this also imply a different language syntax compared to 2.7.2 ?
If so, can somebody point me to documentation of how this is done ?
Many thanks !!!
Jan
Get a new e-mail account with Hotmail - Free. Sign-up now.

Chris Marshall
Joined: 2009-06-17,
User offline. Last seen 44 weeks 3 days ago.
RE: Actors syntax in 2.8
I was seeing a persistent problem in 2.7.7 which clearly arose from the change in underlying scheduler whereby the "pooling" aspecet of the system was not working (i.e. old threads would die very quickly after being used and new ones created). This has stopped happening.
In particular I have an application which creates >25,000 actors and processes >30 million market event updates per day (is a single JVM with 256Mb of heap). Typically the application would spend 5-10% of its total run time in GC (accroding to the JConsole).
This has changed dramatically since the move to 2.8, probably helped by specialization - the GC overhead is now about 0.5% with a concomitant improvement in CPU usage. I've been really delighted in the migration
Chris

From: java.artisan@gmail.com
Date: Tue, 20 Jul 2010 19:25:03 +0200
Subject: Re: [scala-user] Actors syntax in 2.8
To: oxbow_lakes@hotmail.com
CC: scala-user@listes.epfl.ch

Hi Chris,
Ok. Nothing fundamentally changed in the syntax and only under the hood ? Any performance differences ?
Sorry for the obvious question but I struggled through "Programming in Scala" and was about to start for a personal project with actors - agent-based simulations actually. I was worried what 2.8 had changed it all over. :-)
Thanks !
Jan

On Tue, Jul 20, 2010 at 19:08, christopher marshall <oxbow_lakes@hotmail.com> wrote:
I have upgraded a number of actor-based projects from 2.7 to 2.8 with only one gotcha: the Actor.loop is now an instance method and hence must be called self.loop when you are using it in an actor-within-an-actor. Also, calls to mailboxSize are no longer allowed except from the actor itself (or subclasses thereof).
This was an extremely smooth transition

Chris

From: java.artisan@gmail.com
Date: Tue, 20 Jul 2010 17:50:58 +0200
Subject: [scala-user] Actors syntax in 2.8
To: scala-user@listes.epfl.ch

Hello,
It seems actors have been reworked extensively in 2.8. Does this also imply a different language syntax compared to 2.7.2 ?
If so, can somebody point me to documentation of how this is done ?
Many thanks !!!
Jan
Get a new e-mail account with Hotmail - Free. Sign-up now.


Get a free e-mail account with Hotmail. Sign-up now.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland