From e9aec18ddf0292300c7bb039977f7192e5913a70 Mon Sep 17 00:00:00 2001 From: Philipp Haller Date: Thu, 13 Mar 2008 13:40:21 +0000 Subject: Do not reset trapExit in Actor.start. --- src/actors/scala/actors/Actor.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/actors/scala/actors/Actor.scala b/src/actors/scala/actors/Actor.scala index 583a6bae2e..7db3b01a4e 100644 --- a/src/actors/scala/actors/Actor.scala +++ b/src/actors/scala/actors/Actor.scala @@ -675,8 +675,12 @@ trait Actor extends OutputChannel[Any] { * Starts this actor. */ def start(): Actor = synchronized { - // reset various flags - trapExit = false + // Reset various flags. + // + // Note that we do *not* reset `trapExit`. The reason is that + // users should be able to set the field in the constructor + // and before `act` is called. + exitReason = 'normal exiting = false shouldExit = false -- cgit v1.2.3