0Pricing
C++ Academy · Lesson

Async Tasks and Awaiter Types

Compose async tasks with custom awaiter and promise types.

Async Coroutines

An async task suspends on I/O and resumes when the operation completes. Combine co_await with asynchronous APIs for callback-free async code.

The Task Type Sketch

A Task wraps an async coroutine. It supports co_await for chaining.

template <typename T>
struct Task {
    struct promise_type;
    std::coroutine_handle<promise_type> handle;
    // ...
};

All lessons in this course

  1. Coroutine Concepts co_await co_yield co_return
  2. Implementing a Simple Generator
  3. Async Tasks and Awaiter Types
  4. Coroutine Frame Allocation
← Back to C++ Academy