Thanks for reporting this issue. We've known about this for a few weeks. A PR has already been opened to fix it (https://github.com/ruby/ruby/pull/19816).luke-gru (Luke Gruber)
I marked this as a required backport for 4.0, but it actually necessitates backporting [this](https://github.com/ruby/ruby/pull/19597) as well. That's a pretty involved patch that I would say has a med-high risk of itself having bugs. It...luke-gru (Luke Gruber)
Draft PR using the new weak references API: https://github.com/ruby/ruby/pull/19996. This attempts to fix all the known issues with thread join list/fiber/mutex/condvar/queue/io_blocking_operations, etc. Since the bug mentioned in this ...luke-gru (Luke Gruber)
A Method object that is used to define another method with the same name but with a different visibility mutates the `def` of the original method. This is fine, however it doesn't clear the CCs of the old method. ```ruby class Warm;...luke-gru (Luke Gruber)
Thanks for the report. I have a couple of old PRs where I was working on fixing this issue. It isn't an issue just with `Thread#join`, but also with Mutex, ConditionVariable, etc. https://github.com/ruby/ruby/pull/17207 - attempt to f...luke-gru (Luke Gruber)