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
Meaningful thread names #1777
Comments
This sounds like a perfectly reasonable request. How about for 1.6.11 we do 1, and for 1.7 we also do 2. |
Sounds good! I would be fine with 1. |
Agreed, that was what I mean by also doing 2 for 1.7. |
Short description
When you profile a complex application (several threads) it is very useful when you can identify threads in top by name.
Details
When you try to identify what part of a complex application is consuming CPU power, you might use top -p nn -H. Unfortunately all threads used by the mosquitto library will get the same name than the "main thread". So it is hard to identify, if mosquitto is causing the CPU load or another part of the application.
Implementation ideas
Mosquitto is creating some or more threads internally. Today they will not get a specific thread name.
Idea 1 - automatic thread naming
The Mosquitto functions could name all internal threads automatically, e.g. mq_mon, mq_obsrv, etc.
Idea 2 - access to thread IDs
The API could offer access to the IDs of the internal created threads. So the application could name all the threads according to its own naming convention.
Idea 3 - optional parameter with thread names
The API could offer optional initiailization parameters with thread names to be used for the Mosquitto internal threads.
The text was updated successfully, but these errors were encountered: