Questions
KotlinIntermediate4 min
On which thread does Dispatchers.Default execute the task or use which thread?
Answer
Dispatchers.Default uses a shared background thread pool.
- Pool Size: It is backed by a pool of threads equal to the number of CPU cores (minimum 2).
- Optimization: It is optimized for CPU-intensive work. It assumes the code will be actively using the CPU, so it limits the number of threads to avoid excessive context switching.
1:1 Mentorship
Get personalized guidance from a Google Developer Expert. Accelerate your career with dedicated support.
Personalized Learning Path
Mock Interviews & Feedback
Resume & Career Guidance
Share & Help Others
Help fellow developers prepare for interviews
Sharing helps the Android community grow 💚