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

Don't move the timer_thread when it's enclosed #24 #25

Merged

Conversation

gamecreature
Copy link
Contributor

@gamecreature gamecreature commented Feb 12, 2023

Don't move the timer_thread to ThreadGroup::Default, when it's created in an enclosed ThreadGroup.
Prevents the exception: "add" can't move from the enclosed thread group"
Fixes #24.

test/test_timeout.rb Outdated Show resolved Hide resolved
@gamecreature gamecreature force-pushed the feature/handling-enclosed-threadgroups branch 2 times, most recently from 4c130e3 to 27f27d5 Compare February 14, 2023 17:44
Don't move the timer_thread to ThreadGroup::Default, when it's
created in an enclosed ThreadGroup.
Prevents the exception: "add" can't move from the enclosed thread group"
@gamecreature gamecreature force-pushed the feature/handling-enclosed-threadgroups branch from 27f27d5 to 3bcf3bb Compare February 14, 2023 19:29
@eregon eregon force-pushed the feature/handling-enclosed-threadgroups branch from 850abeb to 126d3e0 Compare February 15, 2023 18:47
Copy link
Member

@eregon eregon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simplified the test, thank you for the PR!

@gamecreature
Copy link
Contributor Author

Much better with this simplification!

@eregon eregon merged commit 097e895 into ruby:master Feb 15, 2023
@eregon
Copy link
Member

eregon commented Feb 15, 2023

@hsbt Hello, could you make a release of timeout with this change?
I could also do it myself if you give me permission and tell me how to release it + push the gem, up to you.
Regarding the version, 0.3.2 seems fine, this is a bug fix.

@hsbt
Copy link
Member

hsbt commented Feb 16, 2023

@eregon done! https://github.com/ruby/timeout/releases/tag/v0.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Moving Threads to Threadgroup::Default should not happen for enclosed ThreadGroups
3 participants