summaryrefslogtreecommitdiff
path: root/src/interactive
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-09-23 01:48:12 -0700
committerJason Zaugg <jzaugg@gmail.com>2013-09-23 01:48:12 -0700
commitc96f135f32ffc79bc4bd7ece92aa2f18f2efe99e (patch)
tree3c29bf097e3b46fb6a0d9ecd7f1c0c3b1f572c41 /src/interactive
parent26420f469ebab27a644473c50ca2ac69b02e0314 (diff)
parentf8e28af5c5c081f1c0145f320b683f8278cafdd6 (diff)
downloadscala-c96f135f32ffc79bc4bd7ece92aa2f18f2efe99e.tar.gz
scala-c96f135f32ffc79bc4bd7ece92aa2f18f2efe99e.tar.bz2
scala-c96f135f32ffc79bc4bd7ece92aa2f18f2efe99e.zip
Merge pull request #2968 from huitseeker/interrupt-kosherness
Follow good interrupt discipline in Response
Diffstat (limited to 'src/interactive')
-rw-r--r--src/interactive/scala/tools/nsc/interactive/Response.scala10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/interactive/scala/tools/nsc/interactive/Response.scala b/src/interactive/scala/tools/nsc/interactive/Response.scala
index 0da400378e..3e84c83e55 100644
--- a/src/interactive/scala/tools/nsc/interactive/Response.scala
+++ b/src/interactive/scala/tools/nsc/interactive/Response.scala
@@ -55,7 +55,10 @@ class Response[T] {
try {
wait()
} catch {
- case exc: InterruptedException => raise(exc)
+ case exc: InterruptedException => {
+ Thread.currentThread().interrupt()
+ raise(exc)
+ }
}
}
data.get
@@ -73,7 +76,10 @@ class Response[T] {
try {
wait(timeout - (current - start))
} catch {
- case exc: InterruptedException => raise(exc)
+ case exc: InterruptedException => {
+ Thread.currentThread().interrupt()
+ raise(exc)
+ }
}
current = System.currentTimeMillis
}