Resolved race condition in Reaction.scala

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@11098 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
phaller 2007-05-20 20:48:49 +00:00
parent f268607374
commit 487396de68
1 changed files with 7 additions and 4 deletions

View File

@ -67,13 +67,16 @@ private[actors] class Reaction(a: Actor,
}
case t: Throwable => {
// links
if (!a.links.isEmpty) {
a.exitLinked(t)
a.synchronized {
if (!a.links.isEmpty)
a.exitLinked(t)
}
}
}
if (!a.sessions.isEmpty)
a.sessions = a.sessions.tail
a.synchronized {
if (!a.sessions.isEmpty)
a.sessions = a.sessions.tail
}
Actor.tl.set(saved)
}