StreamRange

class StreamRange(val base: Int, val count: Int)(source)

Allocates unique stream numbers from a documented base, up to count of them. Useful for reserving a contiguous block of streams for a subsystem so a saved spec stays deterministic and non-overlapping. See also SupplyChainScope.autoStream.

Parameters

base

the first stream number

count

how many streams the range owns

Constructors

Link copied to clipboard
constructor(base: Int, count: Int)

Properties

Link copied to clipboard
val base: Int
Link copied to clipboard
val count: Int
Link copied to clipboard
val used: Int

How many streams have been handed out so far.

Functions

Link copied to clipboard
fun next(): Int

The next stream number; throws once the range is exhausted.