GenericValueWaiter
Abstract coroutine-based waiter that suspends callers until a per-call condition is satisfied.
Each call to waitForCondition registers its own predicate and continuation, so any number of coroutines may wait concurrently — each on a possibly-different condition — and each is resumed independently. checkCondition updates the monitored value and resumes every registered waiter whose predicate is now satisfied.
It is abstract by design — a base class for typed waiters (such as BooleanWaiter) that expose the protected waitForCondition through their own typed wait methods — even though it declares no abstract members, since each wait supplies its own predicate.
Parameters
initValue
the initial value.
Type Parameters
T
the type of the monitored value.