Permalink
Browse files

Don't forget to execute pending interrupt requests when shutting down…

… the presentation compiler.
  • Loading branch information...
dragos committed May 10, 2012
1 parent 58bb2d1 commit 0d70c22279daa78b3fe58b5ea1be7f87b7079834
@@ -352,6 +352,10 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "")
case item: WorkItem => Some(item.raiseMissing())
case _ => Some(())
}
// don't forget to service interrupt requests
val iqs = scheduler.dequeueAllInterrupts(_.execute())
debugLog("ShutdownReq: cleaning work queue (%d items)".format(units.size))
debugLog("Cleanup up responses (%d loadedType pending, %d parsedEntered pending)"
.format(waitLoadedTypeResponses.size, getParsedEnteredResponses.size))
@@ -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.
*/

0 comments on commit 0d70c22

Please sign in to comment.