Is there a flatMap variant which drops upstream em...
# coroutines
u
Is there a flatMap variant which drops upstream emits when body is not completed yet Is overriding concurrency to 1 in flatMapMerge okay or should I have a custom operator
👀 1
w
Is there a flatMap variant which drops upstream emits when body is not completed yet
flatMapLatest
u
no I mean upstream, not downstream
blob thinking upside down 1
z
Use one of the other operators before your flat map:
buffer
or
conflate
.
👍 1
u
how would I use buffer? is there a way for the buffer to be signalled when downstream emits? i.e how would buffer know when to stop buffering (& dropping). I'm only aware of time or size buffering
z
you probably just want
conflate
if you want to drop all but the latest element
u
I'm not aware of that, i'll try thanks!