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

Method EnableSignalStopSource

r/src/safe-call-into-r.h:75–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73 bool SignalStopSourceEnabled() { return stop_source_ != nullptr; }
74
75 void EnableSignalStopSource() {
76 // Try to set up the stop source. If another library linking to
77 // the same libarrow shared object has already done this, this call
78 // will fail (which is OK, we just don't get the ability to cancel)
79 if (!SignalStopSourceEnabled()) {
80 auto maybe_stop_source = arrow::SetSignalStopSource();
81 if (maybe_stop_source.ok()) {
82 stop_source_ = maybe_stop_source.ValueUnsafe();
83 } else {
84 cpp11::warning("Failed to enable user cancellation: %s",
85 maybe_stop_source.status().message().c_str());
86 }
87 }
88 }
89
90 void DisableSignalStopSource() {
91 if (SignalStopSourceEnabled()) {

Callers 1

Calls 4

SetSignalStopSourceFunction · 0.85
ValueUnsafeMethod · 0.80
okMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected