Entries by Rainer Grimm

An Improved Thread with C++20

std::jthread stands for joining thread. In addition to std::thread (C++11), std::jthread automatically joins in its destructor and can cooperatively be interrupted. Read this post to know why std::jthread should be your first choice.

Barriers and Atomic Smart Pointers in C++20

In my last post, I introduced latches in C++20. A latch enables its threads to wait until a counter becomes zero. Additionally to a latch, its big sibling barrier can be used more than once. Today, I write about barriers and present atomic smart pointers.

Latches in C++20

Latches and barriers are coordination types that enable some threads to wait until a counter becomes zero. You can use a std::latch only once, but you can use a std::barrier more than once. Today, I have a closer look at latches.

And the Winners are:

Last week,  I launched a quiz. The price was it to win one of the five vouchers for the book “The Modern C++ Programming Cookbook” 2en Edition by Marius Bancila.