A coroutine in C++ is an finite state machine that can be controlled and customized by the promise_type.

Promise Type

A promise type is used to coordinate with coroutines. Unlike the return type, it resides in the coroutine frame and are usually accessed through a pointer (which can be returned by .promise() of a coroutine handle)

Insights

Resources