Concurrency
17 concurrency pages — threads, synchronization primitives, atomics, lock-free, and C++20 additions.
std::condition_variable — atomic wait/notify, spurious wakeup handling, timed waits, condition_variable_any, and C++20 stop_token integration.
C++11C++ lock-free programming — compare_exchange, memory orders, Treiber stack, ABA problem, safe reclamation, and when to prefer mutexes.
C++11Lock-free reader synchronization for read-heavy workloads — readers never block; writers retire old data after a guaranteed grace period.
C++26C++20 counting_semaphore, binary_semaphore, latch, and barrier — efficient thread synchronization primitives with defined happens-before semantics.
C++20"C++11 async primitives: std::async for task-based concurrency, future/promise as a one-shot cross-thread value channel, packaged_task for callable wrapping."
C++11std::atomic<T> provides lock-free atomic operations with configurable memory ordering — covers memory orders, CAS loops, atomic_flag, atomic_ref, wait/notify, and fences.
C++11Apply atomic operations to existing non-atomic objects with std::atomic_ref (C++20): syntax, alignment rules, specializations, and pitfalls.
C++20Thread-safe one-time initialization in C++11 with std::call_once and std::once_flag, including exception semantics, lazy init patterns, and comparison with function-local statics.
C++11P2300 Senders/Receivers: structured, composable async that decouples work from execution context — portable parallelism across thread pools, GPU queues, and event loops without callbacks.
C++26"C++20 std::jthread: auto-joining thread with cooperative cancellation via stop_token, stop_source, and stop_callback."
C++20Controls how memory accesses around atomic operations are ordered across threads; the backbone of C++'s lock-free concurrency model.
C++11C++ mutual exclusion primitives — mutex variants, RAII lock guards, condition variables, and correct patterns for thread-safe code.
C++11A move-only callable wrapper that stores its result or exception in a shared state accessible via std::future.
C++11Write-end of a one-shot, thread-safe channel; pairs with std::future to pass a value or exception across threads.
C++11C++17 reader-writer mutex allowing multiple concurrent shared (read) locks alongside a single exclusive (write) lock, eliminating false serialization of reads.
C++17C++11 portable threading model — thread creation, mutual exclusion, lock-free atomics, and condition-variable signaling for safe concurrent programs.
C++11C++ thread_local — per-thread variables, initialization semantics, destruction order, async pitfalls, and performance characteristics.
C++11