Async Task, Threads, Pools and Executors
summary
Names four core thread types: thread handler async task and handler thread and shows when each actually makes sense. AsyncTask stays tied to an activity and breaks for long camera or blocking work; HandlerThread keeps a looper for continuous jobs like messaging; Executors reduce manual spawning and the recommended option is a thread pool executor with explicit shutdown. Demonstrated socket code with a timeout to avoid hung ports, compared Glide/Picasso and RxJava for real implementations and trade offs.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 5:56Handler
- 7:56Async Task
- 9:42Handler Thread
- 13:38Lambda Expressions
- 14:40Selfmanaged tasks
- 18:06Executors
- 20:38Thread Pool Executor
- 23:50Futures Executor
- 24:41Thread Management
- 27:58Other Examples
- 29:49Questions
related talks
30mExtra! Extra! Thread all about it!
28mInside Android asynchronous processing: Understanding the Event Loop
33mUntangle your App: Efficient Threading in Android
35mEfficient Async with Kotlin Coroutines
37mAndroid Suspenders
49mWhat Mom Never Told You About Multi-Threading
36mJava vs. Kotlin: The Ultimate Showdown of Virtual Threads & Coroutines
23mUnderstanding the main thread
