GetRemainingCapacityAsync Method
GetRemainingCapacityAsync()
Returns the number of additional elements that this queue can ideally (in the absence of memory or resource constraints) accept without blocking, or MaxValue if there is no intrinsic limit.
Declaration
Task<int> GetRemainingCapacityAsync()
Returns
Task<int> | the remaining capacity |
Remarks
Note that you cannot always tell if an attempt to insert an element will succeed by inspecting GetRemainingCapacityAsync() because it may be the case that another thread is about to insert or remove an element.