Share via


ThreadAbortException Class

The exception that is thrown when a call is made to the Abort method.

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)

Syntax

[SerializableAttribute]
public sealed class ThreadAbortException : SystemException

Remarks

This class cannot be inherited.

When a call is made to the Abort method to destroy a thread, the common language runtime (CLR) throws a ThreadAbortException exception. This is a special type of exception that can be caught but will be raised again automatically at the end of the catch block. When this exception is raised, the CLR executes all of the finally blocks before killing the thread. Because the thread can do an unbounded computation in the finally blocks, you must call the Join method to guarantee that the thread has died.

Note

The Join method is a blocking call that does not return until the thread actually stops executing.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, 4.1, and 4.2.

See Also

Reference

System.Threading Namespace