A minimal AsyncGenerator implementation that doesn't rely on coroutines.
More...
#include <coroutine_utils.h>
|
| AsyncGenerator (std::function< std::vector< T >()> func) |
| Constructor.
|
|
std::vector< T > | collect () |
| Collect the results.
|
|
template<typename T>
class agents::AsyncGenerator< T >
A minimal AsyncGenerator implementation that doesn't rely on coroutines.
- Template Parameters
-
◆ AsyncGenerator()
Constructor.
- Parameters
-
func | The function to collect the results |
◆ collect()
Collect the results.
- Returns
- A vector of the results