wwa-coro 0.0.1
Yet Another C++20 Coroutine Library
|
Asynchronous generator. More...
#include <coroutine>
#include <exception>
#include <functional>
#include <iterator>
#include <memory>
#include <type_traits>
#include <utility>
#include "detail.h"
#include "exceptions.h"
#include "task.h"
Go to the source code of this file.
Classes | |
class | wwa::coro::async_generator< Result > |
An asynchronous generator that produces values of type Result . More... | |
class | wwa::coro::async_generator< Result >::iterator |
An input iterator that asynchronously produces values of type Result . More... | |
class | wwa::coro::async_generator< Result >::promise_type |
The promise type of the generator. More... | |
Namespaces | |
namespace | wwa |
namespace | wwa::coro |
Library namespace. | |
Functions | |
template<typename AsyncGenerator, typename Callable> | |
task< void > | wwa::coro::async_for_each (AsyncGenerator gen, Callable callable) |
Asynchronous generator.
This file contains the definition of an asynchronous generator class template. The async_generator
template class allows for the creation of coroutine-based generators that produce values of a specified type asynchronously. It provides an interface for iterating over the generated values using co_await and asynchronous iteration.
Example usage:
Definition in file async_generator.h.