Extra! Extra! Thread all about it!
summary
Explains that Android threading is built on a simple message queue plus Looper and Handler, shows coroutines map to channels (unlimited, buffered, conflated channel, rendezvous) and uses systrace to reveal a priority inversion when a UI thread blocks on a Future. Implements priority inheritance for futures and locks so background workers are temporarily boosted, and adds a UI takeover/handoff so the main thread can finish partial work. Results: fewer long UI stalls but OEM core‑pinning and scheduler quirks still cause variability.
AI-written summary · about
chapters (13)
- 0:00Introduction to threading
- 1:05Why use threads on Android
- 3:54Android threading primitives
- 6:18IntentService and AsyncTask
- 7:42Coroutines and channels
- 12:57Threading for performance
- 15:47Analyzing threads with systrace
- 17:13Priority inversion problem
- 18:40Priority inheritance solution
- 20:03OEM optimizations impact
- 22:51Work transfer between threads
- 26:18Key takeaways and conclusion
- 26:43Q&A session
related talks
28mInside Android asynchronous processing: Understanding the Event Loop
29mLooper.loop() - Understanding Android's Message Queue
23mUnderstanding the main thread
33mUntangle your App: Efficient Threading in Android
37mAsync Task, Threads, Pools and Executors
49mWhat Mom Never Told You About Multi-Threading
37mAndroid Suspenders
31mEffective Procrastination
