Coroutines

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: 12514

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: 15268

A Generic Data Stream with Coroutines in C++20

In my last post in this mini-series on 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: 12679

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: 14667

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, and continued with a lazy future. Today, I execute the future in a separate thread using coroutines as an implementation detail.

Read more
Views: 17491

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.

Read more
Views: 15398

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: 32414

C++20: Thread Pools with cppcoro

This post is the third and final post in my miniseries to cppcoro. cppcoro is a library of coroutine abstractions from Lewis Baker. Today, I introduce thread pools.

Read more
Views: 36099

C++20: Powerful Coroutines with cppcoro

I gave in my last post, "C++20: Coroutines with cppcoro", a basic introduction to the coroutines library from Lewis Baker. This introduction covered the elementary coroutines task and generator. Today, I add threads to tasks and get powerful abstractions. 

Read more
Views: 25721

C++20: Coroutines with cppcoro

The cppcoro library from Lewis Baker gives you what C++20 doesn't: a library of C++ coroutine abstractions based on the coroutines TS.

Read more
Views: 43426

Stay Informed about my Mentoring

 

Mentoring

English 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

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

Course: Master Software Design Patterns and Architecture in C++

Subscribe to the newsletter (+ pdf bundle)

All tags

Blog archive

Source Code

Visitors

Today 4036

Yesterday 4371

Week 39843

Month 169968

All 12057734

Currently are 231 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments