DevBits
DevBitsAndroid Handbook
Coroutines and Flow

What is a coroutine and how does it compare to a thread?

Understand how coroutines suspend work without blocking the threads that execute them.

COR-001Foundational~45 sec

What the interviewer is testing

This question isn't really about memorising what a coroutine is.

They're trying to understand whether you have the right mental model for how work runs in an Android app.

Can you explain the difference between blocking a thread and suspending a coroutine? Do you understand that coroutines still need threads to run, rather than replacing them?

A strong answer shows that you understand why coroutines exist. It's less about knowing the launch API and more about explaining how coroutines let work pause without keeping a thread blocked while it waits.

❌ Common mistake

If they ask you to elaborate

A thread is what actually runs your code

Think about the Android main thread. Every tap, lifecycle callback and screen update eventually runs on that thread.

If you block it for two seconds, the whole UI feels frozen because that thread can't do anything else until your work finishes.

Creating more threads is possible, but they're operating-system resources. They aren't free, and managing lots of them quickly becomes difficult.

A coroutine still needs a thread

A coroutine isn't another kind of thread. It's simply a way of describing a piece of work that can pause and continue later.

When that work reaches something like delay() or waits for a network response, it doesn't keep the thread occupied. The thread can immediately move on to other work while the coroutine waits.

When the result arrives, the coroutine continues from where it left off.

The important difference is what happens while waiting

Imagine your app starts twenty network requests.

Most of the time those requests aren't using the CPU—they're just waiting for the server.

With blocking code, each waiting operation ties up a thread.

With coroutines, waiting doesn't have to keep a thread busy, so a much smaller pool of threads can keep lots of work moving.

Production thinking

In Android, the question usually isn't "Should I use a coroutine instead of a thread?"

It's "What's this work doing while it waits?"

If it's waiting for the network, a database or disk I/O, coroutines let that work pause without keeping a thread blocked.

That doesn't mean coroutines magically make slow code faster. If you do expensive CPU work, the CPU still has to perform that work.

Coroutines make concurrency easier to structure and help your app avoid wasting threads while work is waiting.

Code example

lifecycleScope.launch {
    val profile = repository.loadProfile()
    render(profile)
}

This code reads from top to bottom, but loadProfile() can suspend while waiting for I/O. During that time, the thread is free to run other coroutines instead of sitting idle.

What separates a senior answer

Key takeaways

On this page