Full Byte Developer.

Concurrency vs parallelism, plain words

Concurrency structures overlapping work. Parallelism runs it at the same time. Python and Go docs spell both out.

Published here , updated · 5 sources

Concurrency and parallelism get mashed together in pull request reviews. Python's glossary defines concurrency as performing multiple tasks at the same time, and parallelism as executing operations at the same time on multiple CPU cores [1][2]. Use the wrong word and you pick the wrong API. Related: Python GIL threads are not parallel.

Quick start: overlap two waits on one loop

bash
python3 - <<'PY'
import asyncio, time

async def wait(n):
    await asyncio.sleep(n)

async def main():
    t0 = time.perf_counter()
    await asyncio.gather(wait(0.2), wait(0.2))
    print(f"overlapped ~{time.perf_counter()-t0:.2f}s")

asyncio.run(main())
PY

Captured on this host:

text
overlapped ~0.20s

Wall time near 0.2s, not 0.4s. That is concurrent overlapping waits on one event loop, not proof of multi-core CPU parallelism [3].

Separate the two definitions

Python's glossary is blunt. Concurrency is the ability of a program to perform multiple tasks at the same time. Parallelism is executing multiple operations at the same time, for example on multiple CPU cores [1][2].

You can have lots of in-flight work (concurrency) while only one core is busy right now. You can also run two CPU-bound loops on two cores at once (parallelism). Overlap is not the same as simultaneous execution.

A useful check in a design review: are we talking about structuring many waits, or about finishing CPU work sooner by using more cores? Those answers point at different APIs.

concurrency vs parallelism Concurrency one event loop / thread A, B, C interleave waits overlap, not multi-core proof Parallelism many cores / processes same-time CPU progress [2]

One busy path can still host many waits; parallel CPU work needs more than one execution engine.

Map each model to a real API

Python lists several concurrency forms in that same glossary entry: asyncio for asynchronous tasks and coroutines, threading for OS threads, and multiprocessing for process-based parallelism. The asyncio task docs are the place to start when the work is mostly waiting on I/O [1][3].

Go pushes a different style. Effective Go introduces goroutines as functions executing concurrently with other goroutines in the same address space. You start them with go. Whether the runtime places those goroutines on multiple OS threads is a separate scheduling question from structuring the work [4]. See Goroutines vs Python coroutines and Go without async await.

In the browser and Node world, MDN's event loop page describes how JavaScript runs on a single call stack while the runtime queues callbacks and promises. That is a concurrency story built around waiting, not a claim that JavaScript parallelizes your CPU loop. See JavaScript promises event loop quick start [5].

Compare sequential awaits to gather

bash
python3 - <<'PY'
import asyncio, time

async def wait(n):
    await asyncio.sleep(n)

async def sequential():
    t0 = time.perf_counter()
    await wait(0.15)
    await wait(0.15)
    return time.perf_counter() - t0

async def overlapped():
    t0 = time.perf_counter()
    await asyncio.gather(wait(0.15), wait(0.15))
    return time.perf_counter() - t0

async def main():
    s = await sequential()
    o = await overlapped()
    print(f"sequential ~{s:.2f}s")
    print(f"gather     ~{o:.2f}s")

asyncio.run(main())
PY

Expect sequential near 0.30s and gather near 0.15s. Both are concurrency stories on one loop. Neither proves multi-core speedup for pure Python CPU [3].

Pick the word that matches the bottleneck

BottleneckWord to useTypical tool
Many network or disk waitsConcurrencyasyncio Tasks, goroutines + channels, JS promises
Pure-CPU loops that need more coresParallelismprocesses, native extensions, Go work that actually uses multiple OS threads
Default CPython bytecode on threadsConcurrency with a GIL limitSee Python GIL threads are not parallel

Threads are not a free parallelism switch

On classic CPython, the GIL means many pure-Python CPU threads take turns on bytecode. You still get concurrent overlapping of I/O releases, but not reliable multi-core speedup for pure Python math. Prefer processes or native extensions when the profiler shows CPU, not wait [1][2]. Details live in the GIL page linked above.

Failure checklist

Calling overlapping waits "parallel" in a design doc: rewrite to concurrent unless you measured multi-core CPU use.

Expecting asyncio Tasks to speed up pure-Python CPU: still one event loop thread [3].

Expecting more threads to fix CPython CPU: check the GIL post before adding thread pools.

Confusing Go's concurrent goroutine model with a guarantee that every go call runs on its own OS core [4].

Depth: scheduling versus structuring

Structuring work means you can express many tasks, cancel them, and pass results on channels or futures. Scheduling means the runtime places those tasks on OS threads or cores. Concurrency language usually covers structure. Parallelism language should show up only when you care about simultaneous hardware progress [1][2][4].

When a teammate says "we need more parallelism," ask whether the profiler shows wait or CPU. Wait points at concurrency APIs. CPU points at processes, SIMD, GPUs, or a language runtime that actually uses multiple cores for that workload.

Measure wait versus CPU before you rename the work

A wall-clock improvement after asyncio.gather on two network calls is evidence of overlapping waits. It is not evidence that you used two cores. A wall-clock improvement after moving a pure-Python loop into multiprocessing may be parallelism (or it may be noise if the work was tiny). Record both wall time and CPU time when you write the design note [2][3].

bash
python3 - <<'PY'
import time
t0 = time.perf_counter()
# pretend CPU work
s = sum(i*i for i in range(200000))
print('checksum', s)
print(f'wall ~{time.perf_counter()-t0:.3f}s')
PY

Captured shape on this host (numbers vary by machine):

text
checksum 2666664666680000
wall ~0.010s

Tiny loops do not justify a process pool. Profilers first, vocabulary second.

Channels, queues, and shared memory

Go's channel style and Python's queue style are concurrency structures: they coordinate tasks that may or may not run in parallel depending on the runtime [1][4]. Shared-memory mutations need locks or ownership rules whether you use threads or processes. Naming the coordination tool does not settle the parallelism question.

Browser workers are a parallel escape hatch

MDN's event loop story is single-threaded JavaScript on the main thread [5]. Web Workers move work off that thread; that is a parallelism option for CPU-heavy tasks in the browser, with structured clone costs. Do not call main-thread promise fan-out "parallel CPU" in a performance review.

Two panels on a dark textured field. Left: one teal track with a hexagon, grey circles, and a leading orange circle plus motion blur. Right: four parallel tracks carrying teal, orange, and grey rings linked by thin cross lines.
Concurrency interleaves work on one path; parallelism runs separate paths at the same time.

Keep this guide

By Full Byte Developer

Filed under Dev explainers

Questions about this guide

Is concurrency the same as parallelism?

No. Python's glossary defines concurrency as performing multiple tasks at the same time, and parallelism as executing operations at the same time (for example on multiple CPU cores).

Can one program be concurrent but not parallel?

Yes. A single-threaded event loop can switch among many waiting tasks. That is concurrency without parallel CPU execution, which matches how MDN describes the JavaScript event loop model.

Where does asyncio fit?

asyncio is Python's library for asynchronous tasks and coroutines. The glossary lists it under concurrency forms alongside threading and multiprocessing.

Which Go idea maps to this?

Effective Go introduces goroutines as functions executing concurrently with other goroutines in the same address space. Whether the runtime places them on multiple OS threads is a separate scheduling question from structuring concurrent work with channels.

Sources

Next in this stack