public static Cancel ( GSF.Threading.ManagedThread item, bool allowAbort, object stateInfo ) : void | ||
item | GSF.Threading.ManagedThread | Thread to cancel |
allowAbort | bool | Set to True to abort thread if executing |
stateInfo | object | An object that contains application-specific information, such as state, which can be used by the thread being aborted. |
return | void |
/// <summary> /// 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. /// </summary> public void Abort() { ManagedThreads.Cancel(this, true, null); }
/// <summary> /// 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. /// </summary> /// <param name="stateInfo">An object that contains application-specific information, such as state, which can be used by the thread being aborted.</param> public void Abort(object stateInfo) { ManagedThreads.Cancel(this, true, stateInfo); }