Hello! I am wondering if there is a way to configure different naming patterns for threads of the IO dispatcher and default dispatcher? Right now, they are all named like "DefaultDispatcher-worker-X`, so when I read the logs, it's hard to tell from the thread name whether the work is for the default dispatcher, or the IO dispatcher.
My use case is: Other team members are scheduling thread-blocking work on the default dispatcher, which causes starvation for other coroutines that also want to use the default dispatcher. I want to look at the logs to see who is misusing the default dispatcher, and also implement some code to see if the default dispatcher is responsive or blocked, and dump stack traces with thread names?
Although my codebase has an interface that is supposed to be used to access the different dispatchers, (so we can use different dispatchers for testing) i do see some direct usages of
Dispatchers.IO or Dispatchers.Default. and these direct usages could also be in 3rd party libraries as well, too. So i thought that this issue must be tackled from the library itself?
(I was about to file an issue on kotlin.coroutines github, but the template suggested that I could first ask here)
Thank you very much!! 🙏