Search⌘ K

Overview of Latches and Barriers

Explore how C++20 introduces latches and barriers to simplify thread synchronization. Understand the difference between one-time std::latch and reusable std::barrier, and how they improve performance and ease of use compared to earlier C++ synchronization techniques.

We'll cover the following...

Latches and barriers are coordination types that enable some threads to block until a counter becomes zero. In C++20 we get latches and barriers in two variations: std::latch and std::barrier. Concurrent invocations of the member functions of ...