goOffShift

Takes this resource off shift until goOnShift: its capacity goes to zero, so new seize requests wait in their queues. Work already allocated finishes under the resource's capacityChangeRule, IGNORE by default: a unit that is busy finishes its current allocation, and when it is released it goes to the off-shift change, not to the next waiting request. A second call while off shift does nothing.

A resource whose initialCapacity is 0 has nothing to take off shift, and this throws; check that the initial capacity is greater than 0 first. A resource that uses a capacity schedule takes its capacity from the schedule alone, and this throws too; hasSchedule is the check.