I'm trying to monitor the states of a group of threads in a Microsoft.NET application written in C#. I'd like to be able to also monitor any child threads spawned by the original threads.
In Java, you can assign threads to a thread group, and their children will also belong to the group. Is there an equivalent in .NET?
I briefly looked at ExecutionContext and LogicalCallContext, but I can't see how to find all the threads that are in a context. Raymond Chen has an article about a Win32 API method for enumerating threads, but I hope I don't have to go that low.