diff options
author | Paul Phillips <paulp@improving.org> | 2010-11-11 05:18:59 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-11-11 05:18:59 +0000 |
commit | 82770a97b82f07a1cbbf133c123e4e5aa982d336 (patch) | |
tree | 2315104080f4ea96e977e2a7450005712dc7fb1f /src/compiler/scala/tools/nsc/ScriptRunner.scala | |
parent | bd86b89077131370e422eccd4939ddef6c32c98c (diff) | |
download | scala-82770a97b82f07a1cbbf133c123e4e5aa982d336.tar.gz scala-82770a97b82f07a1cbbf133c123e4e5aa982d336.tar.bz2 scala-82770a97b82f07a1cbbf133c123e4e5aa982d336.zip |
Introduces "Origins" for all your superhero bac...
Introduces "Origins" for all your superhero backstory needs. It logs
where all the calls are coming from: that's all for the moment. It's
explained in the comments and test case, so I'm sure you don't need it
all repeated here. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ScriptRunner.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ScriptRunner.scala | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/nsc/ScriptRunner.scala b/src/compiler/scala/tools/nsc/ScriptRunner.scala index 6f5f2936a8..c432e1c9f0 100644 --- a/src/compiler/scala/tools/nsc/ScriptRunner.scala +++ b/src/compiler/scala/tools/nsc/ScriptRunner.scala @@ -16,7 +16,7 @@ import io.{ Directory, File, Path, PlainFile } import java.net.URL import java.util.jar.{ JarEntry, JarOutputStream } -import util.waitingForThreads +import util.{ waitingForThreads, addShutdownHook } import scala.tools.util.PathResolver import scala.tools.nsc.reporters.{Reporter,ConsoleReporter} @@ -56,14 +56,6 @@ object ScriptRunner { /** Default name to use for the wrapped script */ val defaultScriptMain = "Main" - /** Must be a daemon thread else scripts won't shut down: ticket #3678 */ - private def addShutdownHook(body: => Unit) = - Runtime.getRuntime addShutdownHook { - val t = new Thread { override def run { body } } - t setDaemon true - t - } - /** Pick a main object name from the specified settings */ def scriptMain(settings: Settings) = settings.script.value match { case "" => defaultScriptMain |