We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
headius
Learn more about funding links in repositories.
Report abuse
1 parent eeb2ced commit 8f7385dCopy full SHA for 8f7385d
core/src/main/java/org/jruby/util/io/OpenFile.java
@@ -2638,17 +2638,14 @@ public void addBlockingThread(RubyThread thread) {
2638
* @param thread A thread blocking on this IO
2639
*/
2640
public void removeBlockingThread(RubyThread thread) {
2641
- boolean locked = lock();
2642
- try {
2643
- Set<RubyThread> blockingThreads = this.blockingThreads;
+ Set<RubyThread> blockingThreads = this.blockingThreads;
2644
2645
- if (blockingThreads == null) {
2646
- return;
2647
- }
+ if (blockingThreads == null) {
+ return;
+ }
2648
+ synchronized (blockingThreads) {
2649
blockingThreads.remove(thread);
2650
- } finally {
2651
- if (locked) unlock();
2652
}
2653
2654
0 commit comments