diff options
author | Philipp Haller <hallerp@gmail.com> | 2006-11-03 22:34:23 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2006-11-03 22:34:23 +0000 |
commit | 09369019c793778e634ef3de4f3fbe41ca1e5945 (patch) | |
tree | 58044e5d0bd85204f4c0ee78e0c8c35b6088f8ec /src | |
parent | 23f68d5b13ad64a1bbf01704c4c17c9b926034ec (diff) | |
download | scala-09369019c793778e634ef3de4f3fbe41ca1e5945.tar.gz scala-09369019c793778e634ef3de4f3fbe41ca1e5945.tar.bz2 scala-09369019c793778e634ef3de4f3fbe41ca1e5945.zip |
Fixed loop and andThen (functions were reset by...
Fixed loop and andThen (functions were reset by channel, andThen would
allow kill to finish).
Diffstat (limited to 'src')
-rw-r--r-- | src/actors/scala/actors/Actor.scala | 2 | ||||
-rw-r--r-- | src/actors/scala/actors/Channel.scala | 5 | ||||
-rw-r--r-- | src/actors/scala/actors/Reaction.scala | 11 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/actors/scala/actors/Actor.scala b/src/actors/scala/actors/Actor.scala index b09b9b4a1e..712fb41d85 100644 --- a/src/actors/scala/actors/Actor.scala +++ b/src/actors/scala/actors/Actor.scala @@ -233,7 +233,7 @@ object Actor { */ def seq[a, b >: a](first: => a, next: => b): b = { val s = self - s.kill = () => { next } + s.kill = () => { next; s.kill() } first } diff --git a/src/actors/scala/actors/Channel.scala b/src/actors/scala/actors/Channel.scala index 3046c006b4..3ec944846d 100644 --- a/src/actors/scala/actors/Channel.scala +++ b/src/actors/scala/actors/Channel.scala @@ -145,7 +145,6 @@ class Channel[Msg] extends InputChannel[Msg] with OutputChannel[Msg] { isSuspended = false waitingFor = waitingForNone } - receiver.resetActor() val result = f(received) receiver.popSender() result @@ -191,7 +190,6 @@ class Channel[Msg] extends InputChannel[Msg] with OutputChannel[Msg] { waitingFor = waitingForNone waitingForSender = null } - receiver.resetActor() val result = f(received) receiver.popSender() result @@ -220,7 +218,6 @@ class Channel[Msg] extends InputChannel[Msg] with OutputChannel[Msg] { if (received == null) if (f.isDefinedAt(TIMEOUT)) { isSuspended = false - receiver.resetActor() val result = f(TIMEOUT) return result } @@ -244,7 +241,6 @@ class Channel[Msg] extends InputChannel[Msg] with OutputChannel[Msg] { if (received == null) if (f.isDefinedAt(TIMEOUT)) { isSuspended = false - receiver.resetActor() val result = f(TIMEOUT) return result } @@ -257,7 +253,6 @@ class Channel[Msg] extends InputChannel[Msg] with OutputChannel[Msg] { isSuspended = false waitingFor = waitingForNone } - receiver.resetActor() val result = f(received) receiver.popSender() result diff --git a/src/actors/scala/actors/Reaction.scala b/src/actors/scala/actors/Reaction.scala index da57c0cd3c..62d7e2778b 100644 --- a/src/actors/scala/actors/Reaction.scala +++ b/src/actors/scala/actors/Reaction.scala @@ -98,12 +98,17 @@ private[actors] class ActorTask(a: Actor, a.exit("normal") } catch { - case _: InterruptedException => + case ie: InterruptedException => { + ie.printStackTrace() a.exitLinked() - case d: SuspendActorException => + } + case d: SuspendActorException => { // do nothing (continuation is already saved) - case t: Throwable => + } + case t: Throwable => { + t.printStackTrace() a.exit(t.toString()) + } } finally { Actor.selfs.put(t, saved) |