Bug #17505
closedCan `Thread#group` actually be `nil`?
Description
Is there a circumstance where Thread#group could actually be nil?
The documentation says so, there seems to be source code for this, but I can find no test or RubySpec for this and I don't see anywhere in the ThreadGroup API that could allow this.
Updated by jeremyevans0 (Jeremy Evans) over 5 years ago
I've added a pull request that fixes the documentation and removes code that deals with a missing thread group: https://github.com/ruby/ruby/pull/4163
Updated by jeremyevans (Jeremy Evans) over 5 years ago
- Status changed from Open to Closed
Applied in changeset git|fc83b4896e9d7de084b203b133b84c1209c6ad88.
Don't document that Thread#group can return nil
Thread's are assigned a group at initialization, and no API exists
for them to unassign them from a group without assigning them to
another group.
Fixes [Bug #17505]
Updated by znz (Kazuhiro NISHIYAMA) over 5 years ago
Just FYI
Japanese documents says
Dead thread's group returns nil from 1.8.0 to 1.9.0-0.
Updated by marcandre (Marc-Andre Lafortune) over 5 years ago
Perfect, so this confirms the spec has changed a long time ago 👍