summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/interactive/Global.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2010-07-19 13:56:03 +0000
committerMartin Odersky <odersky@gmail.com>2010-07-19 13:56:03 +0000
commit9c365348fd4e0e40b6499f2abf1b1057735296f6 (patch)
treef41c23a921c28c916eee665194b1542e59514d6a /src/compiler/scala/tools/nsc/interactive/Global.scala
parenta6bb10a310b2d10cfd2713b9d8ca5c21af73902d (diff)
downloadscala-9c365348fd4e0e40b6499f2abf1b1057735296f6.tar.gz
scala-9c365348fd4e0e40b6499f2abf1b1057735296f6.tar.bz2
scala-9c365348fd4e0e40b6499f2abf1b1057735296f6.zip
Added `ask` method to compiler control to do fa...
Added `ask` method to compiler control to do fast trunaround computations on presentation compiler thread.
Diffstat (limited to 'src/compiler/scala/tools/nsc/interactive/Global.scala')
-rw-r--r--src/compiler/scala/tools/nsc/interactive/Global.scala10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala
index 2c174860e4..cb2f4a0340 100644
--- a/src/compiler/scala/tools/nsc/interactive/Global.scala
+++ b/src/compiler/scala/tools/nsc/interactive/Global.scala
@@ -110,10 +110,16 @@ self =>
// ----------------- Polling ---------------------------------------
/** Called from runner thread and signalDone:
- * Poll for exceptions.
- * Poll for work reload/typedTreeAt/doFirst commands during background checking.
+ * Poll for interrupts and execute them immediately.
+ * Then, poll for exceptions and execute them.
+ * Then, poll for work reload/typedTreeAt/doFirst commands during background checking.
*/
def pollForWork() {
+ scheduler.pollInterrupt() match {
+ case Some(ir) =>
+ ir.execute(); pollForWork()
+ case _ =>
+ }
scheduler.pollThrowable() match {
case Some(ex @ CancelActionReq) => if (acting) throw ex
case Some(ex @ FreshRunReq) =>