Skip to content

Commit

Permalink
Revert "improve RequireLock to better match its semantic"
Browse files Browse the repository at this point in the history
This reverts commit 455bcf0.

See #4091 for long explanation, but basically this lock *must*
block, because a false return from this method means the lock had
already been acquired.
headius committed Aug 19, 2016
1 parent ff57604 commit 93707ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/org/jruby/runtime/load/LoadService.java
Original file line number Diff line number Diff line change
@@ -437,7 +437,9 @@ private boolean lock(String requireName) {

if (lock.isHeldByCurrentThread()) return false;

return lock.tryLock();
lock.lock();

return true;
}

/**

0 comments on commit 93707ca

Please sign in to comment.