Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Deciphering Coroutines - A Visual Approach

Meeting Cpp via YouTube

Overview

Explore a comprehensive visual approach to understanding C++20 coroutines in this conference talk from Meeting C++ 2022. Dive into the complexities of coroutine syntax, learning how different elements of the mechanism fit together and how to distinguish between coroutine-specific rules and conventional C++ rules. Construct a coroutine cheat sheet with easily recognizable visual cues to navigate the intricacies of this powerful language feature. Focus on gaining a solid foundation in coroutine syntax, preparing you to tackle more advanced coroutine topics in the future. Through examples and diagrams, examine concepts such as async suspended execution, generator objects, core routines, awaitables, suspension, quarantine, and symmetric transfer. By the end of this talk, gain the tools to read and reason about coroutine code effectively, setting the stage for further exploration of this transformative C++20 addition.

Syllabus

Intro
Agenda
Disclaimer
Basics
Async
Suspended execution
Generator example
Generator object
Interface
Return type
Core routine
Core routine example
Print statement
Pause function
awaitable
suspension
quarantine
suspend always
cheat sheet
awaitables
resuming core routines
resume example
the problem
first connection
await suspend
recap
essential examples
callweight
await
for caller
getanswer
controlflow
the other way
the caller side
the quarantine
the await suspend
return value
yield
yield value
customer waitable
symmetric transfer
hand control back
Symmetrical transfer
Summary
Learning the syntax
Cheatsheet
Questions

Taught by

Meeting Cpp

Reviews

Start your review of Deciphering Coroutines - A Visual Approach

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.