Default ThreadPool Thread Names #69459
Unanswered
peterdrier
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Regarding this code:
runtime/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs
Line 1151 in dd919f1
Does it make sense to have all ThreadPool threads to have the name ".NET ThreadPool Worker"?
Honestly I have a hard time understanding how this even came into being (i.e. the for case for this being in .Net 6).
If it were up to me, and I had to name the .NET TP threads, I'd have called them something like: .NET #76 (where 76 is the ThreadId)
For context I have around 30 packages in my main application, a dozen of which have handful of named threads. As well as a long held habit of renaming the initial thread at startup to "GUI" (which simplifies a lot of debugging). And it's the thread name which I'm logging across the system.
I feel like I'm being forced to switch to using the threadId, and by proxy, I'm losing the information to which part of the system created the thread. Given Thread.Name is write-once, it seems there's no way to fix this poor situation.
Am I completely missing something?
Beta Was this translation helpful? Give feedback.
All reactions