diff options
author | Eugene Vigdorchik <eugenevigdorchik@epfl.ch> | 2011-01-11 14:58:06 +0000 |
---|---|---|
committer | Eugene Vigdorchik <eugenevigdorchik@epfl.ch> | 2011-01-11 14:58:06 +0000 |
commit | f321aef4fddb0bcbbfe0d1c5046a6420e40643c6 (patch) | |
tree | c91aad6427c9427b7df9971143103337471c9ebe /src/compiler | |
parent | c44bf4a00418b66ca494534678c06004924870fe (diff) | |
download | scala-f321aef4fddb0bcbbfe0d1c5046a6420e40643c6.tar.gz scala-f321aef4fddb0bcbbfe0d1c5046a6420e40643c6.tar.bz2 scala-f321aef4fddb0bcbbfe0d1c5046a6420e40643c6.zip |
Allow reload to be issued inside ask non-interr...
Allow reload to be issued inside ask non-interruptibly. Review by
odersky
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/interactive/Global.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala index 649193cffb..808fc85356 100644 --- a/src/compiler/scala/tools/nsc/interactive/Global.scala +++ b/src/compiler/scala/tools/nsc/interactive/Global.scala @@ -413,7 +413,9 @@ self => def reload(sources: List[SourceFile], response: Response[Unit]) { informIDE("reload" + sources) respond(response)(reloadSources(sources)) - if (outOfDate) throw FreshRunReq // cancel background compile + if (outOfDate) + if (activeLocks == 0) throw FreshRunReq // cancel background compile + else scheduler.raise(FreshRunReq) // cancel background compile on the next poll else outOfDate = true // proceed normally and enable new background compile } |