Adds a non-negative safe-integer delta.
A group can be reused by adding work after it reaches zero. A failed group is terminal and rethrows its original failure from every mutation.
Completes a non-negative safe-integer amount of work.
Underflow is rejected atomically: the previous counter is retained, all existing waiters reject, and the group enters a terminal failed state.
Transitions the group into a terminal failed state and rejects all waiters. Repeated rejection preserves the first error.
Waits for the counter to reach zero.
Repeated waits at zero resolve immediately. Existing and future waits reject with the original error after underflow, overflow, or explicit rejection.
Creates a reusable wait group with an optional non-negative counter.