summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/util/WorkScheduler.scala
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2012-05-10 15:46:25 +0200
committerIulian Dragos <jaguarul@gmail.com>2012-05-10 15:46:25 +0200
commit0d70c22279daa78b3fe58b5ea1be7f87b7079834 (patch)
tree6e9a79aa074205e353e6073a875dea202ea7f8d4 /src/compiler/scala/tools/nsc/util/WorkScheduler.scala
parent58bb2d1bd2000ac3aa2c64b6c5dc56c91e911860 (diff)
downloadscala-0d70c22279daa78b3fe58b5ea1be7f87b7079834.tar.gz
scala-0d70c22279daa78b3fe58b5ea1be7f87b7079834.tar.bz2
scala-0d70c22279daa78b3fe58b5ea1be7f87b7079834.zip
Don't forget to execute pending interrupt requests when shutting down the presentation compiler.
Diffstat (limited to 'src/compiler/scala/tools/nsc/util/WorkScheduler.scala')
-rw-r--r--src/compiler/scala/tools/nsc/util/WorkScheduler.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/util/WorkScheduler.scala b/src/compiler/scala/tools/nsc/util/WorkScheduler.scala
index 2534e1192d..8c037cbda5 100644
--- a/src/compiler/scala/tools/nsc/util/WorkScheduler.scala
+++ b/src/compiler/scala/tools/nsc/util/WorkScheduler.scala
@@ -30,6 +30,10 @@ class WorkScheduler {
todo.dequeueAll(a => f(a).isDefined).map(a => f(a).get)
}
+ def dequeueAllInterrupts(f: InterruptReq => Unit): Unit = synchronized {
+ interruptReqs.dequeueAll { iq => f(iq); true }
+ }
+
/** Called from server: return optional exception posted by client
* Reset to no exception.
*/