B
Brett
I'm trying to kill a thread spawned this way:
Form1 spawns Class1 via Thread.start()
Here's my code to kill the thread:
If (t.ThreadState.ToString = "SuspendedRequested, WaitSleepJoin") Or
(t.ThreadState.ToString = "Suspended") Or (t.ThreadState.ToString =
"WaitSleepJoin, Suspended") Then
Else
t.Abort()
End If
The above runs when I close the application. The abort is hit and the main
form closes. Looking at the threads window, I can see the class spawned by
the thread is still active. It's suspend status is 1. It is also using
100% cpu. How can I debug why this thread will not die?
Thanks,
Brett
Form1 spawns Class1 via Thread.start()
Here's my code to kill the thread:
If (t.ThreadState.ToString = "SuspendedRequested, WaitSleepJoin") Or
(t.ThreadState.ToString = "Suspended") Or (t.ThreadState.ToString =
"WaitSleepJoin, Suspended") Then
Else
t.Abort()
End If
The above runs when I close the application. The abort is hit and the main
form closes. Looking at the threads window, I can see the class spawned by
the thread is still active. It's suspend status is 1. It is also using
100% cpu. How can I debug why this thread will not die?
Thanks,
Brett