Thread.Destroy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
deprecated
Throws UnsupportedOperationException
.
[Android.Runtime.Register("destroy", "()V", "GetDestroyHandler")]
[System.Obsolete("deprecated")]
public virtual void Destroy ();
[<Android.Runtime.Register("destroy", "()V", "GetDestroyHandler")>]
[<System.Obsolete("deprecated")>]
abstract member Destroy : unit -> unit
override this.Destroy : unit -> unit
- Attributes
Remarks
Throws UnsupportedOperationException
.
This member is deprecated. This method was originally designed to destroy this thread without any cleanup. Any monitors it held would have remained locked. However, the method was never implemented. If if were to be implemented, it would be deadlock-prone in much the manner of #suspend
. If the target thread held a lock protecting a critical system resource when it was destroyed, no thread could ever access this resource again. If another thread ever attempted to lock this resource, deadlock would result. Such deadlocks typically manifest themselves as "frozen" processes. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.
Java documentation for java.lang.Thread.destroy()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.