~/talk

Go with the Flow

slides:none on file

Explains how Kotlin Flow is built on suspend functions and two interfaces (emitter + collector), shows operator internals, and demonstrates concrete patterns: stateFlow = sharedFlow with replay 1, using stateIn/shareIn to convert cold flows into hot shared state and callbackFlow + awaitClose for listener wrappers. Covers context preservation and exception transparency, Compose lifecycle-safe collection (collectAsStateWithLifecycle), RxJava ↔ Flow interop via asFlow, and practical testing with TestDispatcher and coroutine-test (mentions turbine as option).

AI-written summary · about

  1. 0:00Introduction
  2. 2:37What are Kotlin flows
  3. 9:01Flow internals explained
  4. 13:35Flow operators and use cases
  5. 17:30State flow vs classic flow
  6. 23:48Shared flow and hot streams
  7. 26:43Dispatchers and threading
  8. 28:49Best practices for flows
  9. 30:34Flows in Jetpack Compose
  10. 32:00Migrating from RxJava
  11. 34:48Testing Kotlin flows
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.