diff options
author | Philipp Haller <hallerp@gmail.com> | 2007-05-20 20:48:49 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2007-05-20 20:48:49 +0000 |
commit | 77863427aeaae8c34ae95595eafa5bf0a2d8e69a (patch) | |
tree | 8734a2c2ca0114afc53cf8cd37a8b9d84fb8d67a /src | |
parent | 72b474d620e9f37c13dd7b7f6e5ffc62d1ae327f (diff) | |
download | scala-77863427aeaae8c34ae95595eafa5bf0a2d8e69a.tar.gz scala-77863427aeaae8c34ae95595eafa5bf0a2d8e69a.tar.bz2 scala-77863427aeaae8c34ae95595eafa5bf0a2d8e69a.zip |
Resolved race condition in Reaction.scala
Diffstat (limited to 'src')
-rw-r--r-- | src/actors/scala/actors/Reaction.scala | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/actors/scala/actors/Reaction.scala b/src/actors/scala/actors/Reaction.scala index 3a50a9af06..02f8283354 100644 --- a/src/actors/scala/actors/Reaction.scala +++ b/src/actors/scala/actors/Reaction.scala @@ -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) } |