summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-02-16 21:03:43 +0000
committerPaul Phillips <paulp@improving.org>2010-02-16 21:03:43 +0000
commita6b2e34c55d1ee77d87bedb7d6ddac3b61f24947 (patch)
treea5803ce964cd42c9ffe06f6961afd332e3198ddf /src/compiler
parentf0590625789eab5d6fa8246ff17ae6159dcb46aa (diff)
downloadscala-a6b2e34c55d1ee77d87bedb7d6ddac3b61f24947.tar.gz
scala-a6b2e34c55d1ee77d87bedb7d6ddac3b61f24947.tar.bz2
scala-a6b2e34c55d1ee77d87bedb7d6ddac3b61f24947.zip
Trying again to unbreak the repl patch.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/Interpreter.scala5
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
}