MCPcopy Create free account
hub / github.com/apache/arrow / ReceiveSignals

Method ReceiveSignals

cpp/src/arrow/util/cancel.cc:242–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240 }
241
242 static void ReceiveSignals(std::shared_ptr<SelfPipe> self_pipe) {
243 // Wait for signals on the self-pipe and propagate them to the current StopSource
244 DCHECK(self_pipe);
245 while (true) {
246 auto maybe_payload = self_pipe->Wait();
247 if (maybe_payload.status().IsInvalid()) {
248 // Pipe shut down
249 return;
250 }
251 if (!maybe_payload.ok()) {
252 maybe_payload.status().Warn();
253 return;
254 }
255 const int signum = static_cast<int>(maybe_payload.ValueUnsafe());
256 instance()->ReceiveSignal(signum);
257 }
258 }
259
260 void ReceiveSignal(int signum) {
261 std::lock_guard<std::mutex> lock(mutex_);

Callers

nothing calls this directly

Calls 6

WarnMethod · 0.80
ValueUnsafeMethod · 0.80
ReceiveSignalMethod · 0.80
WaitMethod · 0.45
statusMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected