diff options
author | Paul Phillips <paulp@improving.org> | 2011-11-03 04:51:52 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-11-03 04:51:52 +0000 |
commit | 938eab16f841fee67b2e34c983a7a2a6a5998127 (patch) | |
tree | 0c576763abf934891b519c61dfe5889541955f71 /src/compiler/scala/tools/nsc/io/package.scala | |
parent | b6778be91900b8161e705dc2598ef7af86842b0b (diff) | |
download | scala-938eab16f841fee67b2e34c983a7a2a6a5998127.tar.gz scala-938eab16f841fee67b2e34c983a7a2a6a5998127.tar.bz2 scala-938eab16f841fee67b2e34c983a7a2a6a5998127.zip |
ScalaClassLoader changes.
Lots of fiddling in the interests of a better classloading future.
Diffstat (limited to 'src/compiler/scala/tools/nsc/io/package.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/io/package.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/io/package.scala b/src/compiler/scala/tools/nsc/io/package.scala index d0a1d88086..88679e6dce 100644 --- a/src/compiler/scala/tools/nsc/io/package.scala +++ b/src/compiler/scala/tools/nsc/io/package.scala @@ -25,9 +25,10 @@ package object io { def spawnFn[T](f: () => T): Future[T] = spawn(f()) // Create, start, and return a daemon thread - def daemonize(body: => Unit): Thread = { + def daemonize(body: => Unit): Thread = newThread(_ setDaemon true)(body) + def newThread(f: Thread => Unit)(body: => Unit): Thread = { val thread = new Thread(runnable(body)) - thread setDaemon true + f(thread) thread.start thread } |