wwa-coro 0.0.1
Yet Another C++20 Coroutine Library
|
Adapter for converting asynchronous generators to synchronous generators. More...
#include <cstddef>
#include <iterator>
#include <ranges>
#include <utility>
#include "async_generator.h"
#include "eager_task.h"
Go to the source code of this file.
Classes | |
class | wwa::coro::sync_generator_adapter< Result > |
Adapter for converting asynchronous generators to synchronous generators. More... | |
struct | wwa::coro::sync_generator_adapter< Result >::iterator |
Iterator for the synchronous generator adapter. More... | |
Namespaces | |
namespace | wwa |
namespace | wwa::coro |
Library namespace. | |
Functions | |
template<typename Result> | |
wwa::coro::sync_generator_adapter (async_generator< Result >) -> sync_generator_adapter< Result > | |
Deduction guide for sync_generator_adapter . | |
Adapter for converting asynchronous generators to synchronous generators.
This header file defines the sync_generator_adapter
class, which adapts an async_generator
to provide a synchronous generator interface. This allows asynchronous generators to be used in contexts where synchronous iteration is required.
Example:
Definition in file sync_generator_adapter.h.