Lean async code with Kotlin´s coroutines
summary
Shows concrete Kotlin coroutine patterns used at Gett: using Retrofit for network calls, launch + Job to run two reverse-geocode calls in parallel, using async/await + select to return the first provider result (Google vs startup), wrapping jobs in a lifecycle-aware job cancellor to auto-cancel on destroy, and replacing BroadcastChannel boilerplate with a dataStore/dataStream abstraction. Demo code runs, simplifies sequencing, and improved readability and lifecycle safety.
AI-written summary · about
chapters (7)
- 0:00Introduction to async code
- 2:29What are coroutines
- 5:43Coroutines in practice
- 10:01Parallel task execution
- 12:54Observing with channels
- 16:53Why use coroutines
- 19:47Q&A and summary
related talks
49mKotlin Coroutines in Practice
42mKotlin Coroutines: An Intro to Practical Use on Android
32mNetworking the Kotlin way: Retrofit + Coroutines
40mBuilding Asynchronous Mechanisms in Android App, Using Kotlin Coroutines
42mKotlin Coroutines: Beyond async/await
45mManaging parallelism using coroutines
38mCoroutines by Example
30mBetter asynchronous programming with Kotlin Coroutines
