Lecture: C++ Coroutines From Scratch

I'll show a worked example with a "before" and "after" using C++ coroutines.

C++ 20 introduces coroutines into the language. Coroutines have the potential to greatly simplify some types of code - particularly, but not limited to, anything asynchronous in nature. But early adoption has been hindered by both the lack of library support in the standard and the inherent complexity of the feature itself (which, due to that lack of library support, you are typically more exposed to).

Now we have a bit of a “Blind men and an elephant” problem - where we’re getting disjointed glimpses of what coroutines, supposedly, are - without the big picture. I can’t claim to be able to give you a comprehensively big enough picture in a 90 minute talk, but my aim is to plot a journey through it by starting with a motivating example (a typical multiple async task problem), looking at how we might approach this without coroutines, then seeing what coroutines can do for us - and finally looking at what that might look like with library support, too.


Day: 2023-04-21
Start time: 11:00
Duration: 01:30
Room: Bristol I
Track: Modern C++



Click here to let us know how you liked this event.

Concurrent Events