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

Method WithSignalHandlerContext

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

Source from the content-addressed store, hash-verified

149class WithSignalHandlerContext {
150 public:
151 WithSignalHandlerContext() : signal_handler_registered_(false) {
152 if (MainRThread::GetInstance().SignalStopSourceEnabled()) {
153 arrow::Status result = arrow::RegisterCancellingSignalHandler({SIGINT});
154
155 // If this result was not OK we don't get cancellation for the
156 // lifecycle of this object; however, we can still carry on. This
157 // can occur when forking the R process (e.g., using parallel::mclapply()).
158 if (result.ok()) {
159 signal_handler_registered_ = true;
160 } else {
161 result.Warn();
162 }
163 }
164 }
165
166 ~WithSignalHandlerContext() {
167 if (signal_handler_registered_) {

Callers

nothing calls this directly

Calls 4

WarnMethod · 0.80
okMethod · 0.45

Tested by

no test coverage detected