Share via


ReentrantReadWriteLock.Owner Property

Definition

Returns the thread that currently owns the write lock, or null if not owned.

protected virtual Java.Lang.Thread? Owner { [Android.Runtime.Register("getOwner", "()Ljava/lang/Thread;", "GetGetOwnerHandler")] get; }
[<get: Android.Runtime.Register("getOwner", "()Ljava/lang/Thread;", "GetGetOwnerHandler")>]
member this.Owner : Java.Lang.Thread

Property Value

the owner, or null if not owned

Attributes

Remarks

Returns the thread that currently owns the write lock, or null if not owned. When this method is called by a thread that is not the owner, the return value reflects a best-effort approximation of current lock status. For example, the owner may be momentarily null even if there are threads trying to acquire the lock but have not yet done so. This method is designed to facilitate construction of subclasses that provide more extensive lock monitoring facilities.

Java documentation for java.util.concurrent.locks.ReentrantReadWriteLock.getOwner().

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