Android Suspenders
summary
Kotlin coroutines become a practical threading and async model for Android: shows using launch/async with a ViewModel-scoped Job, how Dispatchers.IO and shared thread pools avoid needless switches, and how to convert Retrofit Tasks or Play Services callbacks into suspend functions via suspendCancellableCoroutine. Examples include parallelizing three network/local calls with async/await, using supervisorScope to avoid parent cancelation, and a location stream implemented as a cancellable suspendable producer.
AI-written summary · about
chapters (15)
- 0:00Start
- 0:16Android's main thread
- 1:53AsyncTask
- 2:12Loaders
- 2:46Libraries
- 3:06Coroutines?
- 3:16What does your typical mobile app do?
- 5:51core -android -rx2
- 9:27How do we use them on Android?
- 11:46Scopes
- 19:03Cancellation requires co-operation
- 19:45Check isActive
- 20:15launch rethrows exceptions
- 23:07What's a Coroutine Dispatcher?
- 32:02Observe location updates Multiple value callback
related talks
38mAndroid Suspenders
40mBuilding Asynchronous Mechanisms in Android App, Using Kotlin Coroutines
36mCracking Kotlin Coroutines
35mEfficient Async with Kotlin Coroutines
42mKotlin Coroutines: Beyond async/await
30mWe Suspend This Program for an Important Announcement
38mAndroid Coroutines: How to manage async tasks in Kotlin
43mAsynchronous programming using Coroutines
