Thread.HoldsLock(Object) Method

Definition

Returns true if and only if the current thread holds the monitor lock on the specified object.

[Android.Runtime.Register("holdsLock", "(Ljava/lang/Object;)Z", "")]
public static bool HoldsLock (Java.Lang.Object obj);
[<Android.Runtime.Register("holdsLock", "(Ljava/lang/Object;)Z", "")>]
static member HoldsLock : Java.Lang.Object -> bool

Parameters

obj
Object

the object on which to test lock ownership

Returns

Boolean

true if the current thread holds the monitor lock on the specified object.

Attributes

Remarks

Java documentation for java.lang.Thread.holdsLock(java.lang.Object).

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