Just to make shure I got that right, I'd like to know if this chain does the following:
- Run updateNotifications on each emission
- If the function takes too long to execute, buffer 1 emission and ignore all others
- When the function finishes, run it again if there's a buffered emission
That's what it should do AFAIK, but you can still test it, test sources are a great place for this.
z
Zach Klippenstein (he/him) [MOD]
07/31/2019, 6:01 PM
conflate
and
buffer
are contradictory and will be fused, with
conflate
winning:
Note that conflate operator is a shortcut for buffer with capacity of Channel.CONFLATED.
Adjacent applications of conflate/buffer, channelFlow, flowOn, produceIn, and broadcastIn are always fused so that only one properly configured channel is used for execution. Conflation takes precedence over buffer() calls with any other capacity.