Concurrency

Concurrency is the ability of a system to make progress on multiple tasks during overlapping time periods.

Intuition

Concurrent work may interleave, run in parallel, or both. The hard part is coordinating shared state safely.

Technical definition

Concurrency concerns the structure and correctness of computations composed of multiple independently progressing tasks, threads, processes, or events.

Example

A web server handles many client requests concurrently.

Common misunderstandings

  • Concurrency is not the same as parallelism.
  • Concurrent programs can fail even when each individual operation looks correct.

Need this inside a product?

The studio builds the systems these terms describe. Tell us what you are working on.