FairSharePool

constructor(engine: LocalHeddle, slots: Int, timeSource: TimeSource.WithComparableMarks, costUnit: Duration, clockStart: Long = 0)

Parameters

engine

the scheduler deciding whose turn it is. The pool reconciles its capacity to slots.

slots

how many leases may be open at once, at least 0.

timeSource

the clock now reads and withSlot measures with. It should be monotonic: a reading that goes back before a mark is taken as no time at all, so a block whose clock stepped back is charged 0, and now never reads below clockStart.

costUnit

how long one unit of LocalHeddle cost is: positive and finite.

clockStart

what now reads at construction, in cost units; non-negative.