Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardKotlinFlow backpressure buffer conflateSingle-choice MCQ

A Flow uses buffer() between a fast emitter and a slow collector. Under the hood, how does this change the suspension behavior compared to a plain (channel-less) Flow?

flow { repeat(1000) { emit(produce(it)) } }.buffer(capacity = 64) .collect { slowConsume(it) }