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

Method AbortUnlocked

cpp/src/arrow/util/async_util.cc:232–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230 }
231
232 void AbortUnlocked(const Status& st, std::unique_lock<std::mutex>&& lk) {
233 DCHECK(!st.ok());
234 bool aborted = false;
235 if (!IsAborted()) {
236 maybe_error_ = st;
237#ifdef ARROW_WITH_OPENTELEMETRY
238 TraceSchedulerAbort(st);
239#endif
240 // Add one more "task" to represent running the abort callback. This
241 // will prevent any other task finishing and marking the scheduler finished
242 // while we are running the abort callback.
243 running_tasks_++;
244 aborted = true;
245 }
246 if (aborted) {
247 lk.unlock();
248 std::move(abort_callback_)(st);
249 lk.lock();
250 running_tasks_--;
251 }
252 MaybeEndUnlocked(std::move(lk));
253 }
254
255 void SubmitTaskUnlocked(std::unique_ptr<Task> task, std::unique_lock<std::mutex>&& lk) {
256 if (stop_token_.IsStopRequested()) {

Callers

nothing calls this directly

Calls 2

TraceSchedulerAbortFunction · 0.85
okMethod · 0.45

Tested by

no test coverage detected