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

Florian

01/31/2021, 2:22 PM
is it possible to call
emitAll
inside a Flow, execute some other operation in parallel, and then switch to a different
emitAll
once the operation is done?
d

Dominaezzz

01/31/2021, 2:26 PM
Yes this is possible. If you do the first
emitAll
inside a
launch
, you can cancel it and call
emitAll
again. Will probably have to use a
channelFlow
builder to do this properly.
f

Florian

01/31/2021, 2:57 PM
thank you
I was hoping to encapsulate that inside a single flow but that doesn't seem possible
3 Views