🚀 Enrollments Open for Jetpack Compose Cohort 2 — 7 Days of Live Learning to Build Modern Android UIs 💚Join Now
KotlinIntermediate4 min
Why Coroutines are lightweight?

Answer

Coroutines are lightweight because they do not map 1:1 to native OS threads.

  1. Suspension vs Blocking: When a coroutine suspends (e.g., `delay(1000)`), it doesn't block the thread. It simply saves its state (local variables, instruction pointer) and releases the thread back to the pool.
  2. Reuse: One thread can execute many coroutines. While one is waiting for network, the thread can execute another.
  3. Stackless: They don't require a dedicated stack frame in the OS for each instance, unlike threads which reserve significant memory (often 1MB) just to exist.

Want to master these concepts?

Join our live cohorts and build production-ready Android apps.

Accelerate Your Growth

Don't just learn concepts in isolation. Build production-ready Android apps with expert guidance.

Live Interactive Sessions
Code Reviews & Feedback
Real-world Projects
Career Guidance

Limited seats available for next cohort