C++20 Modules: Private Module Fragment and Header Units

In the last weeks; I learned something new about modules in C++20: private modules fragments and header units. Consequently, I make a short detour in this post and present these new features.

Read more
Views: 4541

Automatically Resuming a Job with Coroutines on a Separate Thread

In my last post "Starting Jobs with Coroutines", I applied co_await to start a job. In this post, I improve the workflow and automatically resume a job if necessary. In my final step, I resume the job on a separate thread.

Read more
Views: 5961

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.

Read more
Views: 8065

A Generic Data Stream with Coroutines in C++20

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.

Read more
Views: 6563

An Infinite Data Stream with Coroutines in C++20

In this post, I analyze the new keyword co_yield. Thanks to co_yield, you can create an infinite data stream in C++20.

Read more
Views: 8433

Executing a Future in a Separate Thread with Coroutines

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.

Read more
Views: 8688

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

Read more
Views: 7670

Implementing Simple Futures with Coroutines

Instead of return, a coroutine uses co_return returning its result. In this post, I want to implement a simple coroutine using co_return.

Read more
Views: 13980

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 not be anymore.

Read more
Views: 9623

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 in this post to know why std::jthread should be your first choice.

Read more
Views: 54893

My Newest E-Books

Course: Modern C++ Concurrency in Practice

Course: C++ Standard Library including C++14 & C++17

Course: Embedded Programming with Modern C++

Course: Generic Programming (Templates)

Course: C++ Fundamentals for Professionals

Interactive Course: The All-in-One Guide to C++20

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code

Visitors

Today 589

Yesterday 8036

Week 16804

Month 191514

All 7253804

Currently are 171 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments