Side by side
ConcurrencyvsParallelism
What is the difference between concurrency and parallelism?
Updated 2 min read6 differences
In short
Concurrency is handling many tasks in overlapping time, even on one core, while parallelism is running several tasks at the same instant on multiple cores.
Concurrency
Concurrency is a program's ability to make progress on several tasks in overlapping time periods, such as serving many users at once rather than one at a time.
Read the page on ConcurrencyParallelism
Parallelism is running several computations at literally the same time, on multiple CPU cores, GPUs or machines, so a large job finishes faster.
Read the page on ParallelismConcurrency and Parallelism compared
| Aspect | Concurrency | Parallelism |
|---|---|---|
| Definition | Dealing with many tasks in overlapping time | Doing many tasks at the same instant |
| Needs multiple cores | No | Yes |
| About | Program structure | Execution |
| Helps with | Waiting: network, disk, users | CPU-heavy computation |
| Typical tools | Event loops, async/await, goroutines | Threads, processes, GPUs, SIMD |
| Example | A server juggling many connections | Encoding video on all cores |
The difference, explained
A web server handling a thousand connections is concurrent: requests are in progress at the same time, and while one waits for the database, the server works on another. This can happen on a single CPU core by switching between tasks. Parallelism means the work truly runs simultaneously, such as eight cores each resizing a different image.
Rob Pike summed it up in a well-known talk title: concurrency is not parallelism. Concurrency is about structure, dealing with many things at once; parallelism is about execution, doing many things at once. A concurrent program can run in parallel if the hardware allows it, but it doesn't have to.
They solve different problems. Concurrency helps when tasks spend time waiting for networks, disks or users, and is often achieved with event loops, async/await or lightweight threads such as goroutines. Parallelism helps CPU-heavy work, such as video encoding, data processing or machine learning, using multiple threads, processes or GPUs.
A common misconception is that adding threads always makes code faster. For waiting-heavy work, async concurrency is often more efficient than many threads, and in CPython the global interpreter lock prevents threads from running Python code in parallel, so CPU-bound work uses processes. Both concurrency and parallelism also bring risks such as race conditions and deadlocks.
Which one should you use?
Choose Concurrency when…
- Your program mostly waits on networks, files or databases.
- You need to handle many connections or users at once.
- You want a responsive app that stays usable while tasks run.
Choose Parallelism when…
- Your work is CPU-bound, such as computation or encoding.
- The task can be split into independent pieces.
- You have multiple cores or GPUs to keep busy.
Readers ask
Can a program be concurrent without being parallel?
Yes. A single-threaded event loop, like JavaScript's, handles many tasks concurrently by switching between them while they wait, but runs only one piece of code at a time.
Is async/await parallelism?
No, it is a concurrency tool. It lets a program do other work while waiting, usually on one thread; true parallel work needs threads, processes or workers.
Why doesn't Python run threads in parallel?
Standard CPython has a global interpreter lock that lets only one thread run Python code at a time. Threads still help with waiting, and processes or the newer free-threaded builds provide parallelism.