diff options
author | Eugene Vigdorchik <eugenevigdorchik@epfl.ch> | 2010-09-23 12:01:20 +0000 |
---|---|---|
committer | Eugene Vigdorchik <eugenevigdorchik@epfl.ch> | 2010-09-23 12:01:20 +0000 |
commit | c37a59c6834db378086566f473c09e4bc794cf33 (patch) | |
tree | 573f151a6bdcaa112f9d74d4b71c5e97e68a59c1 | |
parent | 0100aacc35584293272f7fe6c09ed5e3489700f8 (diff) | |
download | scala-c37a59c6834db378086566f473c09e4bc794cf33.tar.gz scala-c37a59c6834db378086566f473c09e4bc794cf33.tar.bz2 scala-c37a59c6834db378086566f473c09e4bc794cf33.zip |
InterruptedException while waiting for result s...
InterruptedException while waiting for result should be ignored. review
by odersky
-rw-r--r-- | src/compiler/scala/tools/nsc/util/InterruptReq.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/util/InterruptReq.scala b/src/compiler/scala/tools/nsc/util/InterruptReq.scala index e7c05beb65..b9efb1f406 100644 --- a/src/compiler/scala/tools/nsc/util/InterruptReq.scala +++ b/src/compiler/scala/tools/nsc/util/InterruptReq.scala @@ -26,7 +26,12 @@ abstract class InterruptReq { /** To be called from interrupting client to get result fo interrupt */ def getResult(): R = synchronized { - while (result.isEmpty) wait() + while (result.isEmpty) { + try { + wait() + } catch { case _ : InterruptedException => () } + } + result.get match { case Left(res) => res case Right(t) => throw t |