Channels & Channel-Backed Flows

KOTLIN › Flow

Coroutine-to-coroutine queues, fan-out and fan-in, and the callbackFlow/channelFlow builders built on them.

Channels are the suspending queue that lets two coroutines talk, and they are also the machinery under callbackFlow and channelFlow. Interviewers probe them to see whether you understand hot versus cold, back-pressure, and when consumers should divide work rather than each see all of it. Expect questions on the four capacity modes, send versus trySend, close versus cancel, and the receiveAsFlow/consumeAsFlow distinction that silently breaks event buses when it is got wrong.

What this covers

Study this topic

Further reading