Skip to content

Commit

Permalink
Revert "Handle properly interruption in Java version of LockableObject"
Browse files Browse the repository at this point in the history
This reverts commit d634acf.
  • Loading branch information
pitr-ch committed Jul 29, 2016
1 parent d8c81c5 commit 0f9e82d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ext/com/concurrent_ruby/ext/SynchronizationLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,13 @@ public IRubyObject nsWait(ThreadContext context, IRubyObject[] args) {
}
}
if (Thread.interrupted()) {
// do nothing ns_wait is allowed to wake up spuriously
return this;
throw runtime.newConcurrencyError("thread interrupted");
}

boolean success = false;
try {
success = context.getThread().wait_timeout(this, timeout);
} catch (InterruptedException ie) {
// do nothing ns_wait is allowed to wake up spuriously
throw runtime.newConcurrencyError(ie.getLocalizedMessage());
} finally {
// An interrupt or timeout may have caused us to miss
// a notify that we consumed, so do another notify in
Expand Down

0 comments on commit 0f9e82d

Please sign in to comment.