diff options
author | Paul Phillips <paulp@improving.org> | 2010-02-16 21:03:43 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-02-16 21:03:43 +0000 |
commit | a6b2e34c55d1ee77d87bedb7d6ddac3b61f24947 (patch) | |
tree | a5803ce964cd42c9ffe06f6961afd332e3198ddf | |
parent | f0590625789eab5d6fa8246ff17ae6159dcb46aa (diff) | |
download | scala-a6b2e34c55d1ee77d87bedb7d6ddac3b61f24947.tar.gz scala-a6b2e34c55d1ee77d87bedb7d6ddac3b61f24947.tar.bz2 scala-a6b2e34c55d1ee77d87bedb7d6ddac3b61f24947.zip |
Trying again to unbreak the repl patch.
-rw-r--r-- | src/compiler/scala/tools/nsc/Interpreter.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/Interpreter.scala b/src/compiler/scala/tools/nsc/Interpreter.scala index 551f7e1b40..3b6b7a1a7f 100644 --- a/src/compiler/scala/tools/nsc/Interpreter.scala +++ b/src/compiler/scala/tools/nsc/Interpreter.scala @@ -118,14 +118,15 @@ class Interpreter(val settings: Settings, out: PrintWriter) { // set up initialization future private var _isInitialized: () => Boolean = () => false - def initialize() { + def initialize() = synchronized { if (!_isInitialized()) _isInitialized = scala.concurrent.ops future _initialize() } /** the public, go through the future compiler */ lazy val compiler: Global = { - _isInitialized() // blocks until it is + initialize() + _isInitialized() // blocks until it is _compiler } |