Share via


ReentrantLock.GetWaitQueueLength(ICondition) Method

Definition

Returns an estimate of the number of threads waiting on the given condition associated with this lock.

[Android.Runtime.Register("getWaitQueueLength", "(Ljava/util/concurrent/locks/Condition;)I", "GetGetWaitQueueLength_Ljava_util_concurrent_locks_Condition_Handler")]
public virtual int GetWaitQueueLength (Java.Util.Concurrent.Locks.ICondition? condition);
[<Android.Runtime.Register("getWaitQueueLength", "(Ljava/util/concurrent/locks/Condition;)I", "GetGetWaitQueueLength_Ljava_util_concurrent_locks_Condition_Handler")>]
abstract member GetWaitQueueLength : Java.Util.Concurrent.Locks.ICondition -> int
override this.GetWaitQueueLength : Java.Util.Concurrent.Locks.ICondition -> int

Parameters

condition
ICondition

the condition

Returns

the estimated number of 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

Returns an estimate of the number of threads waiting on the given condition associated with this lock. Note that because timeouts and interrupts may occur at any time, the estimate serves only as an upper bound on the actual number of waiters. This method is designed for use in monitoring of the system state, not for synchronization control.

Java documentation for java.util.concurrent.locks.ReentrantLock.getWaitQueueLength(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