ConditionalValue
A coroutine-based conditional waiter backed by MutableStateFlow.
Holds a value of type T and allows coroutines to suspend until the value satisfies an arbitrary predicate, with optional timeout support.
Every set notifies waiters, even when the new value equals the current one or is the same object changed in place, so each waiter re-checks its predicate. Waiters observe only the latest value: a value replaced before a waiter sees it can be missed, so wait for conditions that stay true once reached.
Parameters
initValue
the initial value.
Type Parameters
T
the type of the monitored value.