コード例 #1
0
 /// <summary>
 /// Waits until it's possible to remove an item from this collection
 /// </summary>
 /// <param name="token">A cancellation token to abort the wait operation</param>
 /// <returns>A task that returns True if an item is available, False if the collection is completed</returns>
 /// <exception cref="OperationCanceledException">The operation was cancelled</exception>
 public ValueTask <bool> Peek(CancellationToken token = default) => _UsedSlots.PeekDecrement(token);