Skip to content

Commit

Permalink
Don't clear the ThreadGroup when Thread terminates
Browse files Browse the repository at this point in the history
CRuby does not clear the ThreadGroup set in the Thread when the
thread terminates. We do, which leads to some unpredictability in
specs that check the group against a very short-lived thread. This
patch removes the call to clear the thread's group.
  • Loading branch information
headius committed Nov 14, 2024
1 parent e3de28b commit 4c7770b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion core/src/main/java/org/jruby/RubyThreadGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ void addDirectly(RubyThread rubyThread) {

public void remove(RubyThread rubyThread) {
synchronized (rubyThread) {
rubyThread.setThreadGroup(null);
rubyThreadList.remove(rubyThread);
}
}
Expand Down

0 comments on commit 4c7770b

Please sign in to comment.