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

CLOVIS

02/13/2020, 12:46 PM
Is the order preserved in a Flow? Is there a way to tell it to run lambdas (
map
, etc) in parallel and send elements as soon as possible, even if the order is lost?
d

Dominaezzz

02/13/2020, 12:49 PM
flatMapMerge
? Order is indeed preserved by default.
c

CLOVIS

02/15/2020, 1:48 PM
Is there an option to say I don't care about the order?
d

Dominaezzz

02/15/2020, 1:52 PM
Maybe I should rewrite that. Order is preserved in a
Flow
since they are sequential. The
flatMapMerge
operator "breaks" this rule because it does not preserve the order.
c

CLOVIS

02/15/2020, 2:09 PM
Oh, thanks 👍
3 Views