In my last post in this mini-series to coroutines from the practical perspective, I presented the workflow of "An Infinite Data Stream with Coroutines in C++20". In this post, I use the generic potential of the data stream.
In this post, I analyze the new keyword co_yield. Thanks to co_yield, you can create an infinite data stream in C++20.
This post concludes my posts about co_return in C++20. I started with an eager future, continued with a lazy future. Today, I execute the future in a separate thread using coroutines as an implementation detail.
Based on the coroutines-based implementation of a simple future in my last post "Implementing Simple Futures with Coroutines", I want to go today one big step further. I analyze the workflow of the simple future and make it lazy.
Instead of return, a coroutine uses co_return returning its result. In this post, I want to implement a simple coroutine using co_return.
What happens when you write without synchronization to std::cout? You get a mess. With C++20, this should not be anymore.
Last week, I launched a quiz. The price was it to win one of the five vouchers for my book "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 in this post to know why std::jthread should be your first choice.
I'm happy to announce a guest post about Time Travel Debugging with UDB. At the end of the post, I have a bonus.
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.
Hunting
Today 1806
Yesterday 6867
Week 15711
Month 1806
All 11297220
Currently are 183 guests and no members online
Kubik-Rubik Joomla! Extensions
Read more...
Read more...