Skip to content
UPEEC

Concurrency in C++

Threads, synchronisation primitives, atomics and parallel algorithms.

Advanced
Comments 0

This is an overview — pick a sub-topic below.

Sub-topics (12)

std::thread

Run a function on a new thread.

Intermediate♥ 0🔖 0💬 0

Mutexes

Ensure only one thread at a time accesses shared data.

Intermediate♥ 0🔖 0💬 0

Locks

RAII wrappers that lock and unlock mutexes automatically.

Intermediate♥ 0🔖 0💬 0

Futures and Promises

A promise sets a value; a future retrieves it later, possibly from another thread.

Intermediate♥ 0🔖 0💬 0

std::async

Run a function asynchronously and get a `std::future` for the result.

Intermediate♥ 0🔖 0💬 0

std::atomic

Lock-free operations on shared variables.

Advanced♥ 0🔖 0💬 0

Memory Ordering

`memory_order_relaxed`, `acquire`, `release`, `seq_cst` control visibility of writes between threads.

Expert♥ 0🔖 0💬 0

Thread Safety

Code is thread-safe if concurrent use cannot cause data races or broken invariants.

Intermediate♥ 0🔖 0💬 0

Parallel Algorithms

Run standard algorithms in parallel with execution policies (C++17).

Intermediate♥ 0🔖 0💬 0

Coroutines for Concurrency

Asynchronous code that reads sequentially — used with networking and task libraries.

Expert♥ 0🔖 0💬 0

Executors and std::execution

A model for describing where and how work runs (senders/receivers), standardised for C++26.

Expert♥ 0🔖 0💬 0

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.