LinkedBlockingQueue.RemainingCapacity Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the number of additional elements that this queue 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 queue can ideally (in the absence of memory or resource constraints) accept without blocking. This is always equal to the initial capacity of this queue less the current size
of this queue.
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.LinkedBlockingQueue.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.