Form the abort method documentation: Raises a ThreadAbortException in the thread on which it is invoked, to begin the process of terminating the thread. Calling this method usually terminates the thread.
You have to manage the exception. Pierre ----------------------------------------------- Pierre Greborio [EMAIL PROTECTED] http://www.pierregreborio.it ----------------------------------------------- -----Original Message----- From: The DOTNET list will be retired 7/1/02 [mailto:[EMAIL PROTECTED]] On Behalf Of Luca Marchesi Sent: Saturday, June 22, 2002 11:54 AM To: [EMAIL PROTECTED] Subject: [DOTNET] A bug in Abort()? 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. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.