Skip to content

Commit 0f9e82d

Browse files
committed
Revert "Handle properly interruption in Java version of LockableObject"
This reverts commit d634acf.
1 parent d8c81c5 commit 0f9e82d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ext/com/concurrent_ruby/ext/SynchronizationLibrary.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,15 +189,13 @@ public IRubyObject nsWait(ThreadContext context, IRubyObject[] args) {
189189
}
190190
}
191191
if (Thread.interrupted()) {
192-
// do nothing ns_wait is allowed to wake up spuriously
193-
return this;
192+
throw runtime.newConcurrencyError("thread interrupted");
194193
}
195-
196194
boolean success = false;
197195
try {
198196
success = context.getThread().wait_timeout(this, timeout);
199197
} catch (InterruptedException ie) {
200-
// do nothing ns_wait is allowed to wake up spuriously
198+
throw runtime.newConcurrencyError(ie.getLocalizedMessage());
201199
} finally {
202200
// An interrupt or timeout may have caused us to miss
203201
// a notify that we consumed, so do another notify in

0 commit comments

Comments
 (0)