summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2011-03-31 13:42:23 +0000
committerIulian Dragos <jaguarul@gmail.com>2011-03-31 13:42:23 +0000
commite5c6241bca640b5b2ec8890a5b5121a1fe9dc14a (patch)
treedfb6954e81e36c3f758ad84ba2db50fd143764b9
parentdaa3b19439e5c40b4c16a36fcdbabf58431f2f2e (diff)
downloadscala-e5c6241bca640b5b2ec8890a5b5121a1fe9dc14a.tar.gz
scala-e5c6241bca640b5b2ec8890a5b5121a1fe9dc14a.tar.bz2
scala-e5c6241bca640b5b2ec8890a5b5121a1fe9dc14a.zip
Allow the presentation thread to terminate when...
Allow the presentation thread to terminate when the compiler is shut down. no review.
-rw-r--r--src/compiler/scala/tools/nsc/interactive/PresentationCompilerThread.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/PresentationCompilerThread.scala b/src/compiler/scala/tools/nsc/interactive/PresentationCompilerThread.scala
index 951cba286f..4ba0208c39 100644
--- a/src/compiler/scala/tools/nsc/interactive/PresentationCompilerThread.scala
+++ b/src/compiler/scala/tools/nsc/interactive/PresentationCompilerThread.scala
@@ -9,13 +9,14 @@ package scala.tools.nsc.interactive
* of its functionality to the compiler instance.
*
*/
-final class PresentationCompilerThread(var compiler: Global, name: String = "") extends Thread("Scala Presentation Compiler V [" + name + "]") {
+final class PresentationCompilerThread(var compiler: Global, name: String = "")
+ extends Thread("Scala Presentation Compiler [" + name + "]") {
/** The presentation compiler loop.
*/
override def run() {
compiler.debugLog("starting new runner thread")
- while (true) try {
+ while (compiler ne null) try {
compiler.checkNoResponsesOutstanding()
compiler.log.logreplay("wait for more work", { compiler.scheduler.waitForMoreWork(); true })
compiler.pollForWork(compiler.NoPosition)