Skip to content

ThreadGroup#enclose does not guard against thread addition #950

@halorgium

Description

@halorgium

The code:

tg = ThreadGroup.new
tg.enclose
t = Thread.new { sleep }
tg.add(t)

should raise ThreadError: can't move to the enclosed thread group.

There is no such guard presently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions