Extra! Extra! Thread all about it!
summary
Android threading uses a simple message-queue + looper + handler model under the hood and Kotlin coroutines map to the same ideas via channels; Systrace shows thread states and revealed a priority inversion where a low-priority background future blocks the main thread causing long waits. The team implements priority inheritance for futures and locks so background workers temporarily match the UI priority, and experiments show OEM tricks like core pinning and Systrace-visible scheduling make this brittle; a work-transfer (UI steals partial work) optimization improves latency but requires splitting and fast state handoff.
AI-written summary · about
chapters (20)
- 0:00Introduction to threading
- 1:05Why use threads on Android
- 2:11UI thread and jank prevention
- 3:15Android threading primitives
- 4:40Handler Thread explained
- 6:26IntentService and AsyncTask
- 7:31Coroutines vs threading
- 8:55Channels for coroutines
- 10:00Channel back pressure
- 12:47Threading for performance
- 14:33Future experiments
- 15:35Systrace thread analysis
- 17:20Priority inversion issue
- 18:45Priority inheritance solution
- 20:12OEM optimizations impact
- 21:58Core pinning challenges
- 23:01Work transfer between threads
- 24:46Parallel execution benefits
- 26:12Key takeaways and conclusion
- 26:35Q&A session
related talks
28mInside Android asynchronous processing: Understanding the Event Loop
28mConcurrency for Imposters
37mAndroid Suspenders
29mLooper.loop() - Understanding Android's Message Queue
31mEffective Procrastination
42mKotlin Multiplatform multithreading old and new way
39mKotlin Native Concurrency Explained
33mUntangle your App: Efficient Threading in Android
