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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep thread names under 15 characters #2733
Conversation
Makes sense. I'm not a huge fan of some of the changed names here (I would prefer we be as descriptive as possible in the 15 chars available) but that might be bikeshedding. Could we have a test that uses |
Totally open to changing names if you have specific suggestions!
There are already a couple of tests that assert some thread names, though they were passing before so I'm not sure how reliable they are. I'll look into adding a Linux-specific test that uses |
@@ -69,7 +69,7 @@ def start_control | |||
|
|||
control.binder.parse [str], self, 'Starting control server' | |||
|
|||
control.run thread_name: 'control' | |||
control.run thread_name: 'ctl' |
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.
Suggestion: lets not change any thread names that are always less than 15 characters.
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.
The problem is that this thread name is also used as a prefix for its accompanying threadpool threads. So if we don't shorten it, we end up with names like puma control tp 001
which is longer than 15 characters.
I added a Linux-only test that uses |
Looks like the added test doesn't work on jruby/truffleruby ( |
Ah I guess we can't see the thread names in |
Thanks! I was struggling to get the test suite to pass with all different environments. |
* Keep thread names under 15 characters * Add test Co-authored-by: Olivier Bellone <olivier@bellone.fr>
Description
Keep thread names under 15 characters.
Linux thread names are limited to 15 characters. Trying to set a longer name will just silently do nothing 馃槨
This PR ensures that all threads created by Puma have names that are 15 characters or shorter. Who needs vowels anyway.
Your checklist for this pull request
[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.