Re: Difference between Aborted and Stopped thread states
"Marsh, Drew" <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.general |
|---|---|
| Message-ID | <[email protected]> |
Luca Marchesi [mailto:[email protected]] wrote: > What's the difference between Aborted and Stopped thread > states? And = between Stopped and Suspended? > > I cannot understand the utility of the Stopped state. How can > a thread = reach the Stopped state? Any relation with GC? Aborted is an extension of the Stopped state. The thread *is* stopped, but only because someone else forced it to. It's an indicator that the thread's work may not have completed because someone explicitly Abort()'d it, causing a ThreadAbortException to be thrown. Suspended means someone has asked the runtime to suspend execution of the thread. Unlike an Aborted or Stopped thread, the execution of a Suspended thread can be resumed by calling Resume. Check out the documentation of the ThreadState enumeration[1] for more details. HTH, Drew [ .NET MVP | weblog: http://radio.weblogs.com/0104813/ ] [1] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/ frlrfSystemThreadingThreadStateClassTopic.asp You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.