MCPcopy Create free account
hub / github.com/apple/foundationdb / when

Function when

documentation/tutorial/tutorial.actor.cpp:67–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 loop choose {
66 when(wait(delay(0.5))) { std::cout << "Still waiting...\n"; }
67 when(int r = wait(ready)) {
68 std::cout << format("Ready %d\n", r);
69 wait(delay(double(r)));
70 std::cout << "Done\n";
71 return Void();
72 }
73 }
74}
75

Callers 4

Future<Void> someFutureFunction · 0.70
Future<Void> eventLoopFunction · 0.70
Future<Void> echoServerFunction · 0.70

Calls 3

delayFunction · 0.85
formatFunction · 0.50
VoidClass · 0.50

Tested by

no test coverage detected