Handing problems, Coroutines & ReactiveX
summary
A small Android app runs active CPU loops and delay-based sleeps to compare Kotlin Coroutines with ReactiveX, exercising five patterns: runBlocking blocks main thread, launch/async inherit main dispatcher and can block if work is active, delay schedules nonblocking suspension, and supervisorJob keeps parent alive when children fail. Coroutines swallow CancellationException, coroutineScope waits for children, Retrofit cooperates with cancellation, and several surprising crash cases are reproducible and fixed in the sample.
AI-written summary · about
chapters (13)
- 0:00Introduction and motivation
- 1:47Why RxJava was adopted
- 5:19Coroutines introduction
- 7:28Coroutine scope and context
- 10:15Active vs simulated work
- 13:48Testing coroutine use cases
- 18:48Five common coroutine patterns
- 22:21Blocking behavior explained
- 26:20Delay vs active work
- 27:47Cancellation behavior
- 30:35Cancelling active jobs
- 37:29Key takeaways and conclusions
- 39:19Q&A and closing
related talks
42mKotlin Coroutines: An Intro to Practical Use on Android
44mTesting Kotlin Coroutines
26mCoroutines and Rx: A Battle Towards Asynchronicity
40mBuilding Asynchronous Mechanisms in Android App, Using Kotlin Coroutines
38mCoroutines by Example
28mConcurrency for Imposters
35mKotlin Coroutine Mechanisms
42mI Swapped RxJava for Coroutines. Why You Should Too
