Share via


IBlockingQueue.RemainingCapacity Method

Definition

Returns the number of additional elements that this queue can ideally (in the absence of memory or resource constraints) accept without blocking, or Integer.MAX_VALUE if there is no intrinsic limit.

[Android.Runtime.Register("remainingCapacity", "()I", "GetRemainingCapacityHandler:Java.Util.Concurrent.IBlockingQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int RemainingCapacity ();
[<Android.Runtime.Register("remainingCapacity", "()I", "GetRemainingCapacityHandler:Java.Util.Concurrent.IBlockingQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member RemainingCapacity : unit -> int

Returns

the remaining capacity

Attributes

Remarks

Returns the number of additional elements that this queue can ideally (in the absence of memory or resource constraints) accept without blocking, or Integer.MAX_VALUE if there is no intrinsic limit.

Note that you <em>cannot</em> always tell if an attempt to insert an element will succeed by inspecting remainingCapacity because it may be the case that another thread is about to insert or remove an element.

Java documentation for java.util.concurrent.BlockingQueue.remainingCapacity().

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