Implementing a Rudimentary Task Type (Part 1)

Learn how to implement an asynchronous task type that can be returned from coroutines using C++ and supports continuations.

Implementation

The task type we are about to implement is a type that can be returned from coroutines that represent asynchronous tasks. The task is something that a caller can wait for using co_await. The goal is to be able to write asynchronous application code that looks like this:

Get hands-on with 1200+ tech skills courses.