The "problem" is that the .NET runtime has ownership of your .NET thread. Therefore, when you call Abort, for example, the internal runtime throws a ThreadAbortException in the .NET context of your .NET thread and that you can catch it in your thread with catch (ThreadAbortException).
The same is true with ThreadState, since it has the basic ownership of your thread, it knows exactly what it is doing, and therefore can create a valid thread state.
Since there is no way for non-hackins to officially request a thread for its internal state, you can wrap this in a class. But then again, you would be completely dependent on the thread method to stick to any .Abort () requests.
source share