Share via


ReentrantReadWriteLock.HasQueuedThread(Thread) Method

Definition

Queries whether the given thread is waiting to acquire either the read or write lock.

[Android.Runtime.Register("hasQueuedThread", "(Ljava/lang/Thread;)Z", "")]
public bool HasQueuedThread (Java.Lang.Thread? thread);
[<Android.Runtime.Register("hasQueuedThread", "(Ljava/lang/Thread;)Z", "")>]
member this.HasQueuedThread : Java.Lang.Thread -> bool

Parameters

thread
Thread

the thread

Returns

true if the given thread is queued waiting for this lock

Attributes

Exceptions

if the thread is null

Remarks

Queries whether the given thread is waiting to acquire either the read or write lock. Note that because cancellations may occur at any time, a true return does not guarantee that this thread will ever acquire a lock. This method is designed primarily for use in monitoring of the system state.

Java documentation for java.util.concurrent.locks.ReentrantReadWriteLock.hasQueuedThread(java.lang.Thread).

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