Entries by Rainer Grimm

Starting Jobs with Coroutines

C++20 has three new keywords to make a coroutine out of a function: co_return, co_yield, and co_await. co_await requires an Awaitable as arguments and starts the Awaiter workflow. Let me show in this post what that means.

Lazy Futures with Coroutines

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 giant step further. I analyze the workflow of the simple future and make it lazy.

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.