My coroutines patterns and habits, 3 years later
summary
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
chapters (13)
- 0:00Intro
- 0:29My coroutines patterns and habits, 3 years later
- 3:13Coroutines in the last 3 years
- 6:28Don't break structured concurrency
- 8:25Don't let your coroutines be garbage collected
- 11:53Use the right CoroutineScope
- 13:06Use the right Coroutine Dispatcher
- 13:42Always support cancellation
- 15:00Don't eat CancellationException
- 16:02Don't wait for everything
- 23:07Racing
- 25:44Coroutines powered Ul abstraction
- 27:03Conclusion
related talks
45mCoroutines, Flow & Android- The Good Parts
41mHanding problems, Coroutines & ReactiveX
44mTesting Kotlin Coroutines
49mLaunching Into Coroutines
42mKotlin Coroutines: An Intro to Practical Use on Android
36mCracking Kotlin Coroutines
37mCoroutines! Gotta catch 'em all!
38mAndroid Coroutines: How to manage async tasks in Kotlin
