resize

fun resize(slots: Int)

Change how many leases may be open at once to slots, reconciling the engine's capacity to it. Raising the count grants queued waiters at once, in the engine's own order. Lowering it preempts nothing: every open lease stays open, and the next grant waits until fewer than slots are.

Throws

when slots is negative, or the engine refuses to reconcile its capacity to it (see LocalHeddle.reconcileCapacity); the pool keeps its old count.