You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
suspendfun <T> Flow<T>.collectLatest(action:suspend (value: T) ->Unit): Unit
Behavior
val flow = flowOf(1, 2, 3, 4, 5)
flow.collectLatest { value:Int->// This lambda would be canceled if a new value is emitted although it hasn't been finished.
delay(100)
println(value) // So only '5' will be printed.
}