Mono Class Library: System.Threading.Thread Overview | Members

System.Threading.Thread.ResetAbort Method

Cancels a Thread.Abort(object) requested for the current thread. [Edit]

public static void ResetAbort ()

Permissions

TypeReason
!:System.Security.SecurityPermission [Edit] Requires permission to control the current thread. See System.Security.Permissions.SecurityPermissionFlag.ControlThread.

Exceptions

TypeReason
System.Threading.ThreadStateExceptionThread.Abort(object) was not invoked on the current thread. [Edit]
System.Security.SecurityExceptionCaller does not have System.Security.Permissions.SecurityPermissionFlag.ControlThread security permission for the current thread. [Edit]

Remarks

This method cannot be called by untrusted code.

When a call is made to Thread.Abort(object) to destroy a thread, the system throws a System.Threading.ThreadAbortException. System.Threading.ThreadAbortException is a special exception that can be caught by application code, but is rethrown at the end of the catch block unless ResetAbort is called. ResetAbort cancels the request to abort, and prevents the ThreadAbortException from terminating the thread.

[Edit]

Example

For an example that demonstrates calling this method, see System.Threading.ThreadAbortException .

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0