I know the managed thread id of thread (obtained fr.om a locked object) I also know that this threadis causing a deadlock. Is it possible to identify the windows thread id? is there any utility available for identifying this.
Asked
Active
Viewed 1,217 times
2
-
possible duplicate of [C#/.NET: How to get the thread id from a thread?](http://stackoverflow.com/questions/1679243/c-net-how-to-get-the-thread-id-from-a-thread) – Pavel Radzivilovsky Aug 20 '10 at 11:36
-
Obtaining such thread ID makes no sense because it is not constant for the same managed thread. – Pavel Radzivilovsky Aug 20 '10 at 11:37
1 Answers
3
The Threads Window in VS2010 displays both the managed and the native ID.
EDIT in reply to comment: I don't believe the information is available in VS2005/8, but you can get it during debugging by loading SOS through the immediate window.
- To load SOS use the
.load sos
command in the immediate window. - To get the thread IDs use the
!threads
SOS command. The ID column holds the managed ID for the thread.

Brian Rasmussen
- 114,645
- 34
- 221
- 317