~/talk

Kotlin Multiplatform multithreading old and new way

Talkat droidcon Berlin 2022 · 2022-07-06..07-08· [kotlin, concurrency]
slides:none on file

Kotlin Multiplatform concurrency historically forces Kotlin/Native code to use freezing and custom dispatchers to avoid frozen-exceptions; the talk shows a working HTTP client built on iOS URLSession that uses Workers plus an atomic-reference byte buffer and explicit clearing to avoid leaks, and explains detached object graphs, channels/flows and CompletableDeferred for lambda/callback bridging. The claimed payoff: with the new memory model (enable kotlin.native.binary.memoryModel=experimental) freezing is removed, default dispatchers work on iOS and multi-threaded GC fixes the main failure modes.

AI-written summary · about

  1. 0:00Introduction
  2. 1:30Kotlin Multiplatform overview
  3. 5:26Old concurrency approach
  4. 10:48Thread safety in Kotlin Native
  5. 14:41Native tools for concurrency
  6. 23:39Detached object graph
  7. 25:26Combining coroutines with flows
  8. 28:22New memory model introduction
  9. 32:18Migrating to new model
  10. 34:51Benefits of new model
  11. 37:42Flows in Kotlin Multiplatform
  12. 40:54Summary and Q&A
~/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.