https://kotlinlang.org logo
#coroutines
Title
# coroutines
s

Sean Proctor

11/07/2023, 9:27 PM
Is it possible to have the
emitAll
in the following be cancelled when the args are updated?
Copy code
combineTransform(flow1, flow2) { arg1, arg2 -> emitAll(createFlow(arg1, arg2)) }
e

ephemient

11/07/2023, 9:36 PM
Copy code
combine(flow1, flow2) { arg1, arg2 -> createFlow(arg1, arg2) }
    .collectLatest { emitAll(it) }
s

Sean Proctor

11/07/2023, 9:40 PM
Thanks! I also found this while searching for a solution: https://github.com/Kotlin/kotlinx.coroutines/issues/1484