~/talk

Inside Android asynchronous processing: Understanding the Event Loop

TalkinPortugueseat AndroidFest Campinas 2018 · 2018-10-19..10-20· [android, concurrency]
links:none on file
slides:none on file

Demonstrates how Android’s single UI event loop (Looper, Handler, Message, Runnable) gets blocked by long-running work using a toy app that computes slow Fibonacci and sleeps to produce dropped frames and an ANR. Shows fixes using threads, ExecutorService (pooled vs serial), Future, AsyncTask (including its default serial-executor pitfall), and Kotlin Coroutines (with Anko) and compares submit/cancel semantics and conciseness. References Android framework source and java.util.concurrent for implementation details.

AI-written summary · about

  1. 0:00Event Loop introduction
  2. 2:09UI performance issues
  3. 3:15What is the Event Loop
  4. 5:59How Handler works
  5. 8:50Blocking UI consequences
  6. 11:21Heavy processing solutions
  7. 13:12Handler alternatives
  8. 15:40Using ExecutorService
  9. 18:56AsyncTask simplification
  10. 21:28AsyncTask pitfalls
  11. 23:56Coroutines as alternative
  12. 26:23Further reading
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.