.NET Framework Class Library
Thread.Abort Method
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.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
Overload List
| Name | Description | |
|---|---|---|
|
Abort() | 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. |
|
Abort(Object) | Raises a ThreadAbortException in the thread on which it is invoked, to begin the process of terminating the thread while also providing exception information about the thread termination. Calling this method usually terminates the thread. |
See Also
Reference
Community Content
Peter Ritchie
Thead.Abort should be avoided.
There's many reasons not to use Thread.Abort and ThreadAbortException
- On certain platforms (like x64 and IA64) the abort can occur before Monitor.Enter and a try block (even with lock/SyncLock), leaving the monitor orphaned.
- The ThreadAbortException can occur in 3rd party code not written to handle thread abort.
- The thread can be aborted while processing a finally block in .NET 1.x
- Uses exceptions for normal control flow logic.
- Asynchronous exception can interrupt modification of shard state or resources, leaving them corrupted.
For more detail see: