~/talk

Migrating to Kotlin State & Shared Flows

Talkat droidcon Lagos 2021 · on Friday, 2021-07-30· [kotlin]
speakerdeck:heyitsmohit
slides:none on file

Explains concrete migration steps: replace ConflatedBroadcastChannel with StateFlow and regular BroadcastChannel with SharedFlow, map send→emit (trySend→tryEmit), and use extraBufferCapacity and replay to match old semantics. Default SharedFlow has replay count=0 by default and never completes normally; emit is suspending. Shows shareIn/stateIn start policies — eager, lazy, whileSubscribed — and demonstrates cancellation triggering onCompletion. Covers buffer overflow handling with overflow strategies: suspend, dropOldest, dropLatest.

AI-written summary · about

  1. 0:00Introduction to migration
  2. 1:47Cold vs hot flows
  3. 3:33State flow basics
  4. 6:51Shared flow features
  5. 12:54Broadcast channel vs shared flow
  6. 16:30Sharing strategies
  7. 23:34Buffer overflow handling
  8. 25:23Migration summary
  9. 26:15Q&A session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.