Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThreadGroup#enclose does not guard against thread addition #950

Closed
halorgium opened this Issue Aug 9, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@halorgium
Copy link

commented Aug 9, 2013

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.

@BanzaiMan BanzaiMan closed this in b4cedc0 Sep 2, 2013

@BanzaiMan

This comment has been minimized.

Copy link
Member

commented Sep 2, 2013

@halorgium We need specs for these. They should check frozen and enclosed for both the source and the destination ThreadGroups.

@halorgium

This comment has been minimized.

Copy link
Author

commented Sep 3, 2013

@BanzaiMan could you reopen this one or file a new issue on RubySpec?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.