Concurrency
Write correct, efficient multithreaded C++ — threads, synchronisation, atomics and parallel algorithms, without needing a lie-down afterwards.
Threads & Synchronisation
std::thread, std::jthread & Thread Management
Learn to create and manage threads with std::thread and C++20's std::jthread. Understand join vs detach, cooperative cancellation with stop tokens, thread-local storage, and exception handling across thread boundaries.
Mutexes, Locks & Critical Sections
Master synchronisation primitives: mutex, lock_guard, unique_lock, scoped_lock, shared_mutex. Learn to protect shared data, prevent deadlocks, and understand the difference between data races and race conditions.
Condition Variables & Producer-Consumer
Use condition variables to efficiently coordinate threads. Build a thread-safe producer-consumer queue, handle spurious wakeups, and avoid the lost wakeup problem.
Async, Atomics & Parallelism
std::async, std::future & std::promise
Use higher-level concurrency abstractions: launch asynchronous tasks with std::async, retrieve results with std::future, and manually set values or exceptions with std::promise.
Atomic Operations & Memory Ordering
Understand lock-free programming with std::atomic. Master memory orderings (relaxed, acquire, release, seq_cst), implement a spinlock with atomic_flag, and learn the compare-and-swap (CAS) pattern.
Parallel Algorithms & Execution Policies
Leverage the C++17 parallel STL to parallelise sorting, transformation, and reduction with execution policies. Understand when parallelism helps, Amdahl's law, and practical thread pool design.