waitUntilTrue

suspend fun waitUntilTrue(timeoutDuration: Duration = Duration.INFINITE): Boolean

Suspends until the value becomes true or the timeout expires.

Return

true if the value became true before the timeout, false if the timeout expired.

Parameters

timeoutDuration

the maximum duration to wait. Defaults to Duration.INFINITE.