Computer ScienceProgrammingMedium

Concurrency (programming)

Also known as:multitaskingparallel execution (informal)concurrent computing

Concurrency is the ability of a program to manage multiple tasks that are in progress at the same time, potentially interleaving their execution on one or more processors. Unlike parallelism (simultaneous execution on multiple cores), concurrency is about program structure — decomposing a problem into independently progressing tasks that communicate and coordinate. Concurrency is essential for responsive UIs, servers handling multiple clients, and efficient use of modern multi-core hardware, and is expressed through threads, coroutines, async/await, and actor models.

Concurrency vs Parallelism vs Asynchrony

ConceptDefinitionHardware RequirementExample
ConcurrencyMultiple tasks in progress simultaneouslySingle or multi-coreWeb server handling requests
ParallelismMultiple tasks executing at the same instantMulti-core requiredMatrix multiplication on GPU
AsynchronyTask proceeds without blocking callerAnyasync/await in JavaScript
SequentialTasks execute one after anotherAnySimple script
DistributedTasks across multiple machinesNetworkMicroservices

Interactive Tools

Codecademy – Concurrency in Python

Open Tool

Brilliant – Concurrency

Open Tool

Khan Academy – Parallel and Distributed Computing

Open Tool
Diagram illustrating a multithreaded process with concurrent execution threads

Wikimedia Commons, CC BY-SA

Related Terms

From Latin "concurrere" (to run together). The formal study of concurrency in computing was pioneered by Edsger Dijkstra in the 1960s, with seminal work on mutual exclusion and the dining philosophers problem.

concurrencymultithreadingparallelismasyncoperating-systems