Share via


ReentrantReadWriteLock.HasWaiters(ICondition) Method

Definition

Queries whether any threads are waiting on the given condition associated with the write lock.

[Android.Runtime.Register("hasWaiters", "(Ljava/util/concurrent/locks/Condition;)Z", "GetHasWaiters_Ljava_util_concurrent_locks_Condition_Handler")]
public virtual bool HasWaiters (Java.Util.Concurrent.Locks.ICondition? condition);
[<Android.Runtime.Register("hasWaiters", "(Ljava/util/concurrent/locks/Condition;)Z", "GetHasWaiters_Ljava_util_concurrent_locks_Condition_Handler")>]
abstract member HasWaiters : Java.Util.Concurrent.Locks.ICondition -> bool
override this.HasWaiters : Java.Util.Concurrent.Locks.ICondition -> bool

Parameters

condition
ICondition

the condition

Returns

true if there are any waiting threads

Attributes

Exceptions

if this lock is not held

if the given condition is not associated with this lock

if the condition is null

Remarks

Queries whether any threads are waiting on the given condition associated with the write lock. Note that because timeouts and interrupts may occur at any time, a true return does not guarantee that a future signal will awaken any threads. This method is designed primarily for use in monitoring of the system state.

Java documentation for java.util.concurrent.locks.ReentrantReadWriteLock.hasWaiters(java.util.concurrent.locks.Condition).

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