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
- Coroutine Concepts co_await co_yield co_return
- Implementing a Simple Generator
- Async Tasks and Awaiter Types
- Coroutine Frame Allocation