-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Feature | Shutdown on idle #3209
Conversation
From #2580
Is that last thing (in bold) happening here? |
1112f58
to
e9ce031
Compare
I haven't looked into this (so probably not). I'll add a test and go from there. |
df57bd0
to
d4ee5a3
Compare
d4ee5a3
to
4f25af5
Compare
f8ac038
to
272f2c6
Compare
I'm hoping that this covers it: 272f2c6. |
cdf9a69
to
23fc9b2
Compare
I don't really have a better solution. I'm trying to think about how a timer thread or something like that could be used instead. |
Hmm that sounds interesting, I'll experiement and see how it goes. Thanks for the review! |
The ChatGPT answer I got wasn't bad either: update the time you last received data each time you get data, and have a background timer thread check every second if that time is X seconds ago or greater. |
d482cd1
to
a6a31b3
Compare
Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
a6a31b3
to
9c4a15a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching the easiest possible solution @byroot!
191e7fa
to
cbe68bd
Compare
cbe68bd
to
9276343
Compare
9276343
to
4c0430a
Compare
Thanks @joshuay03, this ended up being a great PR 👍 |
Description
Closes #2580.
I attended RubyConfAU earlier this year and was inspired by this talk to contribute to puma. During my search for a small enough issue (preferably a bug) to tackle I stumbled upon the feature request linked above and noticed that it'd been open for a while. I liked the idea and thought it'd be a useful feature, and decided to give it a go.
I'm very new to this 'area' of Ruby so I might need some guidance on how sensible my implementation is...
Your checklist for this pull request
[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.