Summary: Concurrency
A summary of what we discussed in the “Concurrency” chapter.
In this chapter, you have seen how to create programs that can execute multiple threads concurrently. We also covered how to avoid data races by protecting critical sections with locks or by using atomics. You learned that C++20 comes with some useful synchronization primitives: latches, barriers, and semaphores. We then looked into execution order and the C++ memory model, which becomes important to understand when writing lock-free programs.
Get hands-on with 1400+ tech skills courses.