IndexPool
public struct IndexPool : ISupplier<int>, IFunctional<Func<int>>, IConsumer<int>, IFunctional<Action<int>>, IReadOnlyCollection<int>, IEnumerable<int>, IEnumerable
Represents a pool of integer values.
Represents an enumerator over available indicies 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 indicies.
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 indicies in the pool.
Returns an index previously obtained using TryTake back to the pool.
Returns multiple indicies, atomically.
Returns the available index from the pool.
Takes all available indicies, atomically.
Tries to peek the next available index from the pool, without acquiring it.
Returns the available index from the pool.