Hy everybody.

The SDK says

" If Abort is called on a thread that has been suspended, the thread is resumed and 
then aborted. "

But if I suspend and abort a thread I obtain a ThreadSTateExcpetion

"An unhandled exception of type 'System.Threading.ThreadStateException' occurred in 
mscorlib.dll
Additional information: Thread is suspended; attempting to abort."

Is this a bug?

Luca     

-----

[VB.NET]

Dim t As New Thread(New ThreadStart(AddressOf ThreadProc))
t.Start()
t.Suspend()
Thread.Sleep(1000) ' permit to the other thread to run
t.Abort()


Sub ThreadProc()

    While True
    End While

End Sub

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to