androidengineers.Book a session
โ† All interview 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.

Mark this when you can explain the answer in your own words.

Share & Help Others

Help fellow developers prepare for interviews

Sharing helps the Android community grow ๐Ÿ’š

Keep practising