Go with the Flow!
summary
Shows how to implement concrete Kotlin coroutines Flow operators: a partition operator that returns two cold flows (evens and odds) implemented with flow builders and collect, a takeUntil implemented with channelFlow and send that launches a producer coroutine and cancels it when a signal flow or duration fires, and a groupBy that creates 10 flows of 10 elements using per-key channels (uses Channel.UNLIMITED by default to avoid deadlock). Examples run and behave as expected; RxJava equivalents span thousands of lines while these implementations stay compact.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 0:27What is Kotlin Flow
- 1:07Why use Flow over RxJava
- 2:13Implementing partition operator
- 4:00Coroutines and structured concurrency
- 10:27Take until operator explained
- 12:37Channel flow for concurrency
- 19:43Flow vs RxJava implementation
- 21:34Group by operator introduction
- 22:38Using group by in practice
- 25:11Implementing group by operator
- 31:14Back pressure and channel buffers
- 36:10Handling exceptions and cleanup
- 37:17Demo of group by operator
- 37:42Flow vs RxJava comparison
- 39:08Closing and Q&A








