Shows how to use run_awaitable
to turn any awaitable into an eager coroutine that runs synchronously from the caller's perspective.
#include <iostream>
namespace {
{
co_return v + 1;
}
{
auto result = co_await async_increment(v);
std::cout << "Result: " << result << "\n";
}
}
int main()
{
return 0;
}
eager_task run_awaitable(Awaitable &&f, Args &&... args)
Turns any awaitable into an eager fire-and-forget coroutine.