Better asynchronous programming with Kotlin Coroutines
summary
Builds a tiny DSL with extension functions load/then that runs a background async block as a Deferred and resumes on the UI, wires a LifecycleObserver to cancel that Deferred when stopped, and implements click throttling with an actor backed by a channel using offer to drop events while busy. Shows integration with Retrofit via a Deferred adapter, claims hundreds to thousands of coroutines are cheap on Android, and notes coroutines are still experimental.
AI-written summary · about
chapters (17)
- 0:00BETTER ASYNC ON ANDROID WITH KOTLIN COROUTINES
- 3:32WHAT WE WANT
- 6:06CONTINUATION?
- 9:31WHAT THREAD TO RUN ON
- 9:53SPECIFY A PARENT COROUTINE
- 10:07THE FUNCTION TO RUN
- 11:49SUSPENDED FUNCTION
- 15:00LIFECYCLE OBSERVER
- 16:29MORE CONTROL
- 18:21CHANNELS
- 18:57CAN BE USED LIKE A SEQUENCE!
- 21:03ACTORS
- 22:22CONFUSED?
- 25:26COROUTINE LIBRARIES
- 25:51RETROFIT ADAPTER
- 26:30GRADLE STUFF
- 26:50RESOURCES
related talks
30mBetter asynchronous programming with Kotlin Coroutines
42mKotlin Coroutines: Beyond async/await
42mKotlin Coroutines: An Intro to Practical Use on Android
47mKotlin Coroutines
59mKotlin coroutines: new ways to do asynchronous programming
40mBuilding Asynchronous Mechanisms in Android App, Using Kotlin Coroutines
32mNetworking the Kotlin way: Retrofit + Coroutines
49mKotlin Coroutines
