Search code examples
c++multithreadingvisual-studiodebugging

How to know who is the parent thread of a given thread ID


I'm debugging a program in vs 2008. There is a thread list with thread IDs. Is the any way or tool that I can use to identify the parent thread of a given thread ID? Thanks.


Solution

  • There is no API, at least standard and documented, to obtain a creator thread ID for a given thread. Neither Performance Monitor, Visual Studio IDE, Process Explorer nor Spy++ provide this information. Once started, a thread is not dependent on its creator any longer and runs independently; there is no parent-child relation in particular.