diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2012-05-10 15:46:25 +0200 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2012-05-10 15:46:25 +0200 |
commit | 0d70c22279daa78b3fe58b5ea1be7f87b7079834 (patch) | |
tree | 6e9a79aa074205e353e6073a875dea202ea7f8d4 /src/compiler/scala/tools/nsc/util/WorkScheduler.scala | |
parent | 58bb2d1bd2000ac3aa2c64b6c5dc56c91e911860 (diff) | |
download | scala-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.scala | 4 |
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. */ |