6
Concurrent System Programming with C++
In this chapter, we will look at what concurrency means and how it is different from parallelism. We will go through the fundamentals and the theory behind processes and threads. We will look at the changes in the C++ memory model, which enforce native concurrency support in the language. We will also familiarize ourselves with what a race condition is, how it can lead to a data race, and how to prevent data races. Next, we will get acquainted with the C++20 std::jthread primitive, which enables multithreading support. We will learn about the specifics of the std::jthread class and how we can stop already running std::jthread instances by using the std::stop_source primitive. Finally, we will learn how ...
Get C++ Programming for Linux Systems now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.