Kotlin & Coroutines (50 Qs)•Part 2: Coroutines, Flow & Concurrency Architecture (11 - 24)
How does Backpressure handling work in Kotlin Flow (buffer, conflate, collectLatest)?
senior LevelSystem Design
In Simple Words:
buffer(): Runs emissions concurrently with collector in a separate buffer.conflate(): Drops intermediate emissions if collector is too slow, delivering only the newest item.collectLatest(): Cancels the current collector block and restarts it whenever a new value arrives.