~/talk

Kotlin Coroutines and Flows

Talkat droidcon Americas 2020 · 2020-11-16..11-17· [kotlin, concurrency]
links:none on file
slides:none on file

Covers concrete coroutine mechanics: suspend functions compile to continuations carrying a coroutine context, and coroutines run on Dispatchers.IO/Main/Default with withContext to switch threads. Demonstrates structured concurrency via scopes (viewModelScope, lifecycleScope) and cancellation (cancel children, isActive/yield). Shows channels (rendezvous, buffered, conflated, unlimited) and that flows are cold; operators include zip, combine, and flatMapMerge(concurrency=2) for parallel image fetches. Converts callbacks using suspendCoroutine and callbackFlow with offer/close/awaitClose. Mentions Kotlin coroutines beating Rx in a KotlinConf benchmark.

AI-written summary · about

  1. 0:00Introduction
  2. 1:13Why coroutines matter
  3. 3:37Coroutines vs threads
  4. 5:00Suspend functions
  5. 6:25Launch vs async
  6. 9:16Structured concurrency
  7. 11:46Coroutine scopes and dispatchers
  8. 13:52Cancelling coroutines
  9. 14:34Channels for streaming
  10. 19:34Flows basics
  11. 23:49Flow operators
  12. 24:34Combining flows
  13. 27:42Flattening flows
  14. 29:26Converting callbacks
  15. 34:55Q&A
~/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.