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

Function when

flow/ActorCollection.actor.cpp:41–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40 loop choose {
41 when(Future<Void> f = waitNext(addActor)) {
42 int64_t t = nextTag++;
43 tag_streamHelper[t] = streamHelper(complete, errors, tag(f, t));
44 ++*pCount;
45 if (*pCount == 1 && lastChangeTime && idleTime && allTime) {
46 double currentTime = now();
47 *idleTime += currentTime - *lastChangeTime;
48 *allTime += currentTime - *lastChangeTime;
49 *lastChangeTime = currentTime;
50 }
51 }
52 when(int64_t t = waitNext(complete.getFuture())) {
53 if (!--*pCount) {
54 if (lastChangeTime && idleTime && allTime) {

Callers

nothing calls this directly

Calls 5

tagFunction · 0.85
nowFunction · 0.85
VoidClass · 0.70
getFutureMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected