Is there no `flatMap-` family operator that ignores new upstream emissions while a mapping operation...
d
Is there no
flatMap-
family operator that ignores new upstream emissions while a mapping operation is being processed (i.e. mapped stream is not completed)? How could this be achieved? I don't want emissions buffered as with
concat
, but thrown away/ignored.
n
Use the
buffer
operator before
flatMap-
. I think you want
buffer(Channel.RENDEZVOUS, BufferOverflow.DROP_LATEST)
FYI,
flatMapConcat
doesn’t buffer anything. It’s the
Flow
you applied the operator on that is doing the buffering.
👍 1
d
Thanks @Nick Allen
n
I mixed up the BufferOverflow param that you want before. Just replaced
DROP_OLDEST
with
DROP_LATEST
in earlier comment.