MCPcopy Create free account
hub / github.com/apache/mesos / loop

Method loop

3rdparty/libprocess/src/grpc.cpp:147–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145
146
147void Runtime::RuntimeProcess::loop()
148{
149 void* tag;
150 bool ok;
151
152 while (queue.Next(&tag, &ok)) {
153 // Currently only unary RPCs are supported, so `ok` should always be true.
154 // See: https://grpc.io/grpc/cpp/classgrpc_1_1_completion_queue.html#a86d9810ced694e50f7987ac90b9f8c1a // NOLINT
155 CHECK(ok);
156
157 // Obtain the tag as a `ReceiveCallback` and dispatch it to the runtime
158 // process. The tag is then reclaimed here.
159 ReceiveCallback* callback = reinterpret_cast<ReceiveCallback*>(tag);
160 dispatch(self(), &RuntimeProcess::receive, std::move(*callback));
161 delete callback;
162 }
163
164 // Terminate self after all events are drained.
165 process::terminate(self(), false);
166}
167
168
169Runtime::Data::Data()

Callers

nothing calls this directly

Calls 2

dispatchFunction · 0.70
terminateFunction · 0.70

Tested by

no test coverage detected