From e5c6241bca640b5b2ec8890a5b5121a1fe9dc14a Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Thu, 31 Mar 2011 13:42:23 +0000 Subject: Allow the presentation thread to terminate when... Allow the presentation thread to terminate when the compiler is shut down. no review. --- .../scala/tools/nsc/interactive/PresentationCompilerThread.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit v1.2.3