IndexPool
public struct IndexPool : ISupplier<int>, IFunctional<Func<int>>, IConsumer<int>, IFunctional<Action<int>>, IReadOnlyCollection<int>, IEnumerable<int>, IEnumerable, IResettable
Represents a pool of integer values.
Represents an enumerator over available indices in the pool.
Gets the maximum capacity of the pool.
Gets the maximum number that can be returned by the pool.
Gets the number of available indices.
Gets or sets a value indicating that the pool is empty.
public IndexPool()
Initializes a new pool that can return an integer value within the range [0.. MaxValue].
Initializes a new pool that can return an integer within the range [0..maxValue].
Determines whether the specified index is available for rent.
Gets an enumerator over available indices in the pool.
Returns all values to the pool.
Returns an index previously obtained using TryTake back to the pool.
Returns multiple indices, atomically.
Returns the available index from the pool.
Takes all available indices, atomically.
Tries to peek the next available index from the pool, without acquiring it.
Returns the available index from the pool.