- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Actor library change in 2.8
Mon, 2010-09-06, 13:28
Hi,
We're in the process of rewriting our application (that heavily uses actors) to 2.8, and I've noticed an incompatible change:Actor#exit() is now "def protected[actors]" (was public). This change breaks the code that uses anonymous actors created with "actor { … }", leaving no clean way of shutting down such actors. Besides, it contradicts the documentation: scaladoc for self states that it "should be used instead of this in all blocks of code executed by actors", and there's currently no way to cleanly shutdown an loop()ing actor other than calling this.exit(). What's the rationale behind this change?
We're in the process of rewriting our application (that heavily uses actors) to 2.8, and I've noticed an incompatible change:Actor#exit() is now "def protected[actors]" (was public). This change breaks the code that uses anonymous actors created with "actor { … }", leaving no clean way of shutting down such actors. Besides, it contradicts the documentation: scaladoc for self states that it "should be used instead of this in all blocks of code executed by actors", and there's currently no way to cleanly shutdown an loop()ing actor other than calling this.exit(). What's the rationale behind this change?
Mon, 2010-09-06, 13:57
#2
Re: Actor library change in 2.8
Thanks, didn't notice it for some reason.Still, what's the rationale behind the change? I don't really see the point of leaving react, receive and the rest public, but hiding exit.
On Mon, Sep 6, 2010 at 4:31 PM, Erik Engbrecht <erik.engbrecht@gmail.com> wrote:
On Mon, Sep 6, 2010 at 4:31 PM, Erik Engbrecht <erik.engbrecht@gmail.com> wrote:
Try Actor.exit, the method on the Actor companion object, which is still public.
On Mon, Sep 6, 2010 at 8:28 AM, Alexey Ermakov <zee@technocore.ru> wrote:
Hi,
We're in the process of rewriting our application (that heavily uses actors) to 2.8, and I've noticed an incompatible change: Actor#exit() is now "def protected[actors]" (was public). This change breaks the code that uses anonymous actors created with "actor { … }", leaving no clean way of shutting down such actors. Besides, it contradicts the documentation: scaladoc for self states that it "should be used instead of this in all blocks of code executed by actors", and there's currently no way to cleanly shutdown an loop()ing actor other than calling this.exit(). What's the rationale behind this change?
--
http://erikengbrecht.blogspot.com/
Sat, 2010-09-11, 14:37
#3
Re: Actor library change in 2.8
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexey Ermakov schrieb:
> Thanks, didn't notice it for some reason. Still, what's the rationale behind
> the change? I don't really see the point of leaving react, receive and the
> rest public, but hiding exit.
just guessing here, but maybe its because "Actor.exit()" expresses
your intent way clearer than just "exit()". Especially because that
call typically is nested somewhere in a case clause within react {..}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkyKWGMACgkQZbZrB6HelLJurQCfasFe/l7EqF4Wq0wFIaTCYCoI
uF8AnAtjg8RacXXmT6ltGDjU6BjAcDjL
=ec+j
-----END PGP SIGNATURE-----
On Mon, Sep 6, 2010 at 8:28 AM, Alexey Ermakov <zee@technocore.ru> wrote:
--
http://erikengbrecht.blogspot.com/