共用方式為


LinkedBlockingDeque.RemainingCapacity Method

Definition

Returns the number of additional elements that this deque can ideally (in the absence of memory or resource constraints) accept without blocking.

[Android.Runtime.Register("remainingCapacity", "()I", "GetRemainingCapacityHandler")]
public virtual int RemainingCapacity ();
[<Android.Runtime.Register("remainingCapacity", "()I", "GetRemainingCapacityHandler")>]
abstract member RemainingCapacity : unit -> int
override this.RemainingCapacity : unit -> int

Returns

Implements

Attributes

Remarks

Returns the number of additional elements that this deque can ideally (in the absence of memory or resource constraints) accept without blocking. This is always equal to the initial capacity of this deque less the current size of this deque.

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.LinkedBlockingDeque.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