Lazy Futures with Coroutines
/
0 Comments
Based on the coroutines-based implementation of a simple future in my last post "Implementing Simple…
Implementing Simple Futures with Coroutines
Instead of return, a coroutine uses co_return returning its result. In this post, I want to implement…
Synchronized Output Streams with C++20
What happens when you write without synchronization to std::cout? You get a mess. With C++20, this should…
An Improved Thread with C++20
std::jthread stands for joining thread. In addition to std::thread (C++11), std::jthread automatically…
Cooperative Interruption of a Thread in C++20
A typical question in my C++ seminars is: Can a thread be killed? Before C++20, my answer is no.…
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…
Latches in C++20
Latches and barriers are coordination types that enable some threads to wait until a counter becomes…
Semaphores in C++20
Semaphores are a synchronization mechanism used to control concurrent access to a shared resource. They…
Performance Comparison of Condition Variables and Atomics in C++20
After the introduction to std::atomic_flag in my last post, Synchronization with Atomics in C++20, I…
Synchronization with Atomics in C++20
Sender/receiver workflows are pretty common for threads. In such a workflow, the receiver is waiting…