diff options
author | Eugene Vigdorchik <eugenevigdorchik@epfl.ch> | 2010-11-21 11:45:04 +0000 |
---|---|---|
committer | Eugene Vigdorchik <eugenevigdorchik@epfl.ch> | 2010-11-21 11:45:04 +0000 |
commit | e3cfb4216f89dfba3db1e6fd3bb7b985ee11c924 (patch) | |
tree | 7be665fa85e41b2ce01858f40b21d8b895426a3e /src | |
parent | 0e70623ab8742433cb2745beacdd9747a3db532c (diff) | |
download | scala-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.scala | 8 |
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) |