~/talk

My coroutines patterns and habits, 3 years later

Talkat Android Makers 2022 · 2022-04-25..04-26· [android, kotlin]
slides:none on file

Claims concrete numbers and tactics: a seven year app migrates to coroutines until one third of the functions are suspending; Google and AndroidX adopt suspend and Flow APIs; AWS SDK exposes suspending operations. Covers real failures and fixes: accidental coroutines get garbage collected when scopes are wrong, leaks from wrong lifecycle scopes, and missing cancellation. Shows patterns that work: try finally for cleanup, scope choices like viewModelScope and rememberCoroutineScope, and racing to cancel losers for fastest responses.

AI-written summary · about

  1. 0:00Intro
  2. 0:29My coroutines patterns and habits, 3 years later
  3. 3:13Coroutines in the last 3 years
  4. 6:28Don't break structured concurrency
  5. 8:25Don't let your coroutines be garbage collected
  6. 11:53Use the right CoroutineScope
  7. 13:06Use the right Coroutine Dispatcher
  8. 13:42Always support cancellation
  9. 15:00Don't eat CancellationException
  10. 16:02Don't wait for everything
  11. 23:07Racing
  12. 25:44Coroutines powered Ul abstraction
  13. 27:03Conclusion
~/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.