diff options
author | Philipp Haller <hallerp@gmail.com> | 2008-04-03 14:06:35 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2008-04-03 14:06:35 +0000 |
commit | fcb2ea2ebd5b190dbdb962a7cee3588a1d2c2aa4 (patch) | |
tree | 590636327c306b71a9952beb62d0caf7c3aa392c /src/actors | |
parent | 70ac4996ae77082888f32d0a2b608a9e1d1bd5d7 (diff) | |
download | scala-fcb2ea2ebd5b190dbdb962a7cee3588a1d2c2aa4.tar.gz scala-fcb2ea2ebd5b190dbdb962a7cee3588a1d2c2aa4.tar.bz2 scala-fcb2ea2ebd5b190dbdb962a7cee3588a1d2c2aa4.zip |
Fixed #694.
Diffstat (limited to 'src/actors')
-rw-r--r-- | src/actors/scala/actors/Actor.scala | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/actors/scala/actors/Actor.scala b/src/actors/scala/actors/Actor.scala index 7db3b01a4e..1d89a1590f 100644 --- a/src/actors/scala/actors/Actor.scala +++ b/src/actors/scala/actors/Actor.scala @@ -285,7 +285,7 @@ object Actor { * </li> * </ul> * - * @version 0.9.10 + * @version 0.9.12 * @author Philipp Haller */ @serializable @@ -299,7 +299,6 @@ trait Actor extends OutputChannel[Any] { private val mailbox = new MessageQueue private var sessions: List[OutputChannel[Any]] = Nil - private var session1: Option[OutputChannel[Any]] = None /** * Sends <code>msg</code> to this actor (asynchronous) supplying @@ -316,7 +315,7 @@ trait Actor extends OutputChannel[Any] { if (isSuspended) sessions = replyTo :: sessions else - session1 = Some(replyTo) + sessions = List(replyTo) waitingFor = waitingForNone @@ -433,7 +432,7 @@ trait Actor extends OutputChannel[Any] { continuation = f isDetached = true } else { - session1 = Some(qel.session) + sessions = List(qel.session) scheduleActor(f, qel.msg) } throw new SuspendActorException @@ -466,7 +465,7 @@ trait Actor extends OutputChannel[Any] { continuation = f isDetached = true } else { - session1 = Some(qel.session) + sessions = List(qel.session) scheduleActor(f, qel.msg) } throw new SuspendActorException @@ -596,13 +595,7 @@ trait Actor extends OutputChannel[Any] { case x => x } - def sender: OutputChannel[Any] = - if (sessions.isEmpty) { - session1 match { - case None => null - case Some(s) => s - } - } else sessions.head + def sender: OutputChannel[Any] = sessions.head def receiver: Actor = this |