message-io
message-io copied to clipboard
Modify thread name
I would like the ability to provide an alternate thread name for the threads in for_each() and for_each_async(). If this is a change you are open to incorporating, I can make the change and put up a PR. Any interest?
Hi!
I'm open to it :)
How will you enable this functionality without touching the API?
I see some approaches to configure the thread names:
- compilation variable.
- environment variable.
- static variable you set before starting anything message-io related (maybe the most versatile).
I was wondering how to do it as well. I think the static variable approach you mentioned would be the best approach.
As a suggestion, the crate https://github.com/matklad/once_cell could be usefull