MCPcopy Create free account
hub / github.com/Codesire-Deng/co_context / run

Function run

example/when_all.cpp:26–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26task<> 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
33int main() {
34 io_context ctx;

Callers 1

mainFunction · 0.70

Calls 4

allFunction · 0.85
f0Function · 0.70
f1Function · 0.70
f2Function · 0.70

Tested by

no test coverage detected