timeoutFirstOrDefault

fun <T, R> Flow<T>.timeoutFirstOrDefault(millis: Long, default: () -> R): Flow<R>(source)

If the upstream emits no first event within millis milliseconds it will emit the event returned by default followed by all later emissions from the upstream.


fun <T, R> Flow<T>.timeoutFirstOrDefault(duration: Duration, default: () -> R): Flow<R>(source)

If the upstream emits no first event within duration it will emit the event returned by default followed by all later emissions from the upstream.


fun <T, R> Flow<T>.timeoutFirstOrDefault(millis: Long, default: R): Flow<R>(source)

If the upstream emits no first event within millis milliseconds it will emit the event default followed by all later emissions from the upstream.


fun <T, R> Flow<T>.timeoutFirstOrDefault(duration: Duration, default: R): Flow<R>(source)

If the upstream emits no first event within duration it will emit the event default followed by all later emissions from the upstream.