| 24 | } |
| 25 | |
| 26 | task<> run() { |
| 27 | // co_spawn f1 & f2 & f3, and wait for them |
| 28 | auto [r0, r1] = co_await all(f0(), f1(), f2()); |
| 29 | std::cout << "get the result of f0: " << r0 << "\n"; |
| 30 | std::cout << "get the result of f1: " << r1 << "\n"; |
| 31 | } |
| 32 | |
| 33 | int main() { |
| 34 | io_context ctx; |