#include #include "co_context/io_context.h" #include "co_context/lazy_io.h" using namespace std; using namespace co_context; task<> the_answer(int t) { const char* name = "hello"; cout << "lazyout" << endl; co_await lazy::write(1, { name, 5 }, 10); cout << name << t << endl; co_return; } int main() { io_context context; int a = 3; auto b = the_answer(a); b.get_handle().resume(); b.get_handle().resume(); //context.co_spawn(the_answer(a)); //context.co_spawn(the_answer(5)); //context.start(); return 0; }