diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-09-23 01:48:12 -0700 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-09-23 01:48:12 -0700 |
commit | c96f135f32ffc79bc4bd7ece92aa2f18f2efe99e (patch) | |
tree | 3c29bf097e3b46fb6a0d9ecd7f1c0c3b1f572c41 /src | |
parent | 26420f469ebab27a644473c50ca2ac69b02e0314 (diff) | |
parent | f8e28af5c5c081f1c0145f320b683f8278cafdd6 (diff) | |
download | scala-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')
-rw-r--r-- | src/interactive/scala/tools/nsc/interactive/Response.scala | 10 |
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 } |