Contributions

Article
Instead of return, a coroutine uses co_return returning its result. In this post, I want to implement a simple coroutine using co_return.
Update
What happens when you write without synchronization to std::cout? You get a mess. With C++20, this should not be anymore.
Article
What happens when you write without synchronization to std::cout? You get a mess. With C++20, this should not be anymore.
Article
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 in this post to know why std::jthread should be your first choice.
Article
A typical question in my C++ seminars is: Can A thread be killed?. Before C++20, my answer is no. With C++20, you can ask a thread politely for its interruption.
Article
In my last post, I introduced latches in C++20. A latch enables it 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.
Article
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.
Article
Semaphores are a synchronization mechanism used to control concurrent access to a shared resource. They also allow it to play ping-pong.
Article
After the introduction to std::atomic_flag in my last post Synchronization with Atomics in C++20, I want to dive deeper. Today, I create a ping-pong game using condition variables, std::atomic_flag, and std::atomic. Let's play.
Article
Sender/receiver workflows are quite common for threads. In such a workflow, the receiver is waiting for the sender's notification before it continues to work. There are various ways to implement these workflows. With C++11, you can use condition variables or promise/future pairs; with C++20, you can use atomics.
Article
Atomics receives a few important extensions in C++20. Today, I start with the new data type std::atomic_ref.
Article
This post concludes my presentation of library features in C++20. Today I write about the class std::source_location and a few functions for bit manipulation.
Article
When your program's compilation broke with a brand-new C++20 feature, you often end with a few questions: Did I something wrong? Did I found a compiler bug? Does my compiler not yet support this feature? Thanks to the feature testing in C++20, the last question is easy to answer.
Article
When you compare signed and unsigned integers, you may not get the result you expect. Thanks to the six std::cmp_* functions, there is a cure in C++20.
Article
On his blog Modern C++ he deals intensively with his passion C++.
Library
shared libraries for terminal handling
Library
A library for text mode user interfaces
Library
A text-based widget toolkit