Aborting a Thread:; won't leave AbortRequested state
-
I am using Visual Studio.Net 2003 My mainThread creates a newThread and the newThread starts doing its thing. At some point the newThread suspends itself; at which point it enters the ThreadState of Suspended. I am trying to abort the newTread from my mainThread. When i attempt this using a newThread->abort(); It throws a ThreadStateException, i beleive because the newThread is suspended. At this point the ThreadState of newThread is (SuspendRequested, AbortRequested). So in the ThreadStateException catch, i use a newThread->Resume(); This causes the threadState of newThread to be simply (AbortRequested). The problem is that I can't figure out how to get the newThread to leave AbortRequested state and enter the Stopped state. If I call the abort from within newThread, it enters the Stopped state without problem; why can't I abort the newThread from within mainThread? any help would be appreciated, Thanks, Jody Blau