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

Method Poll

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

Source from the content-addressed store, hash-verified

86}
87
88Status StopToken::Poll() const {
89 if (!impl_) {
90 return Status::OK();
91 }
92 if (!impl_->requested_.load()) {
93 return Status::OK();
94 }
95
96 std::lock_guard<std::mutex> lock(impl_->mutex_);
97 if (impl_->cancel_error_.ok()) {
98 auto signum = impl_->requested_.load();
99 DCHECK_GT(signum, 0);
100 impl_->cancel_error_ = internal::CancelledFromSignal(signum, "Operation cancelled");
101 }
102 return impl_->cancel_error_;
103}
104
105namespace {
106

Callers 15

ToRecordBatchesMethod · 0.80
NextMethod · 0.80
ListFlightsMethod · 0.80
ListActionsMethod · 0.80
operator()Method · 0.80
AppendRealMethod · 0.80
AppendRealMethod · 0.80
AddTaskMethod · 0.80
SubmitTaskUnlockedMethod · 0.80
TEST_FFunction · 0.80
AssertStopRequestedMethod · 0.80

Calls 4

CancelledFromSignalFunction · 0.85
OKFunction · 0.50
loadMethod · 0.45
okMethod · 0.45

Tested by 3

TEST_FFunction · 0.64
AssertStopRequestedMethod · 0.64