fail

fun fail(rule: InterruptRule = interruptRule)(source)

Fails this resource now: no unit can be allocated until repair, and the requests waiting for it go on waiting. Its holders meet rule: under FINISH they complete their work, and the units they release are kept from the waiting requests until the repair; under RESUME and RESTART all their units go missing, so a holder's delay that depends on them is held, and a delay it starts while failed begins held. The capacity is unchanged, and capacity changes and shifts still apply underneath. A resource that is already failed throws; isFailed is the check.

Parameters

rule

what happens to work in service; by default the resource's interruptRule