Get ThreadName from ThreadID

Is there a way to get Thread ThreadName ThreadId? (e.g. ThreadID, e.g. 10 or 15, etc.)

+7
multithreading c #
source share
2 answers

Not in managed code. As far as I know, you cannot even get a list of Thread objects for the current process. You can get ProcessThread using Process.Threads and ProcessThread provides an Id if that helps you ... but ProcessThread has no name until I can say: (

+9
source share

The best information I can find is here:

http://www.mail-archive.com/advanced-dotnet@discuss.develop.com/msg07369.html

This does not seem too useful. There seems to be no good way to do this unless you have changed the code to support the list (or dictionary) of all your applications.

+2
source share

All Articles