Best Practices for Concurrency

Speaker: Rainer Grimm

Audience level: Beginner | Intermediate


With the standardisation of C++11, C++ got a multithreading library and a memory model. The library has the basic building blocks such as atomics, threads, tasks, locks, and condition variables. The memory model provides guarantees for the thread-safe usage of this basic building blocks.

Seven years, we are now happy to have many best practices for multithreading and the memory model.
My talk is precisely about these best practices to general rules for concurrency, special rules for the multithreading library, and special rules for the memory model. The focus of many of this best practices is far beyond C++.

The best practices are mainly based on my personal experience giving a lot of C++ classes and workshops to concurrency in the last years. Additionally, guidelines such as the C++ core guidelines were are a great inspiration to me.