ReentrantLock.IsLocked Property

Definition

Queries if this lock is held by any thread.

public virtual bool IsLocked { [Android.Runtime.Register("isLocked", "()Z", "GetIsLockedHandler")] get; }
[<get: Android.Runtime.Register("isLocked", "()Z", "GetIsLockedHandler")>]
member this.IsLocked : bool

Property Value

true if any thread holds this lock and false otherwise

Attributes

Remarks

Queries if this lock is held by any thread. This method is designed for use in monitoring of the system state, not for synchronization control.

Java documentation for java.util.concurrent.locks.ReentrantLock.isLocked().

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