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.
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.
The cppcoro library from Lewis Baker gives you what C++20 doesn't give you: a library of C++ coroutine abstractions based on the coroutines TS.
It's a typical requirement for thread management to synchronize them. One thread prepares, in this case, a work-package another thread is waiting for.
My story to coroutines in C++20 goes on. Today I dive deep into the coroutines framework to create an infinite data stream. Consequentially, you have to read the two previous posts "C++20: Coroutines - A First Overview", and "C++20: More Details to Coroutines" to be prepared.
After I gave you in my last post (C++20: Coroutines - A First Overview) the first impression of coroutines, I want to provide today more details. Once more, we get in C++20 not coroutines but a framework for building coroutines.
C++20 provides four features that change the way we think about and write modern C++: concepts, the ranges library, coroutines, and modules. I already wrote a few posts to concepts and the ranges library. Let's have a closer look at coroutines.
Currently are 108 guests and no members online
Kubik-Rubik Joomla! Extensions