Concurrency in C++20 and Beyond

By Anthony Williams

C++20 is set to add new facilities to make writing concurrent code easier. Some of them come from the previously published Concurrency TS, and others are new, but they all make our lives as developers easier. This talk will introduce the new features, and explain how and why we should use them.

The evolution of the C++ Concurrency support doesn’t stop there though: the committee has a continuous stream of new proposals. This talk will also introduce some of the most important of these, including the new Executor model.

These include std::jthread, which provides automatic joining of threads, std::stop_token for cooperative signalling of shutdown, std::latch for notifying when a batch of operations have completed, std::barrier for multithreaded loop synchronization, and std::counting_semaphore for general, flexible synchronization.