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
Closed

ThreadGroup#enclose does not guard against thread addition #950

halorgium opened this issue Aug 9, 2013 · 2 comments
Labels
Milestone

Comments

@halorgium
Copy link

@halorgium halorgium 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
Copy link
Member

@BanzaiMan BanzaiMan 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
Copy link
Author

@halorgium halorgium 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
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants