summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEugene Vigdorchik <eugenevigdorchik@epfl.ch>2010-11-21 11:45:04 +0000
committerEugene Vigdorchik <eugenevigdorchik@epfl.ch>2010-11-21 11:45:04 +0000
commite3cfb4216f89dfba3db1e6fd3bb7b985ee11c924 (patch)
tree7be665fa85e41b2ce01858f40b21d8b895426a3e /src
parent0e70623ab8742433cb2745beacdd9747a3db532c (diff)
downloadscala-e3cfb4216f89dfba3db1e6fd3bb7b985ee11c924.tar.gz
scala-e3cfb4216f89dfba3db1e6fd3bb7b985ee11c924.tar.bz2
scala-e3cfb4216f89dfba3db1e6fd3bb7b985ee11c924.zip
Make interrupts non-interruptible, otherwise th...
Make interrupts non-interruptible, otherwise the interrupt exception can just go direct to the user (IDE). Review by odersky.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/interactive/Global.scala8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala
index 86b9465699..da6051acae 100644
--- a/src/compiler/scala/tools/nsc/interactive/Global.scala
+++ b/src/compiler/scala/tools/nsc/interactive/Global.scala
@@ -145,7 +145,13 @@ self =>
def pollForWork() {
scheduler.pollInterrupt() match {
case Some(ir) =>
- ir.execute(); pollForWork()
+ try {
+ activeLocks += 1
+ ir.execute()
+ } finally {
+ activeLocks -= 1
+ }
+ pollForWork()
case _ =>
}
if (pendingResponse.isCancelled)