Project

General

Profile

Actions

Feature #19440

open

Deprecate ThreadGroup

Added by Eregon (Benoit Daloze) about 1 year ago. Updated about 1 year ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:112438]

Description

I looked at the ThreadGroup methods, and none of them seem really useful.

enclose has super confusing semantics, in that it surprisingly allows creating new threads from a thread already in that group, but forbids #add.
So the new thread is not the same as "adding" a thread, very confusing.

This weird restriction results for instance in Timeout not being able to move the Thread it creates to the default ThreadGroup:
https://github.com/ruby/timeout/issues/24
And there is also no method to create a Thread in the given ThreadGroup.

add and list could just be simulated with an Array.

Maybe it's time we deprecate ThreadGroup or at least enclose/enclosed? since those seem to have unusable/useless semantics?
If not, how do we cleanly solve https://github.com/ruby/timeout/issues/24?


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #19020: Unexpected timeout thread appears in ThreadGroupClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0