Aracılığıyla paylaş


Thread.Suspend Method

Definition

Caution

deprecated

Throws UnsupportedOperationException.

[Android.Runtime.Register("suspend", "()V", "")]
[System.Obsolete("deprecated")]
public void Suspend ();
[<Android.Runtime.Register("suspend", "()V", "")>]
[<System.Obsolete("deprecated")>]
member this.Suspend : unit -> unit
Attributes

Remarks

Throws UnsupportedOperationException.

This member is deprecated. This method has been deprecated, as it is inherently deadlock-prone. If the target thread holds a lock on the monitor protecting a critical system resource when it is suspended, no thread can access this resource until the target thread is resumed. If the thread that would resume the target thread attempts to lock this monitor prior to calling resume, deadlock results. 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.suspend().

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.

Applies to