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

Method SubmitTaskUnlocked

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

Source from the content-addressed store, hash-verified

253 }
254
255 void SubmitTaskUnlocked(std::unique_ptr<Task> task, std::unique_lock<std::mutex>&& lk) {
256 if (stop_token_.IsStopRequested()) {
257 AbortUnlocked(stop_token_.Poll(), std::move(lk));
258 return;
259 }
260#ifdef ARROW_WITH_OPENTELEMETRY
261 // It's important that the task's span be active while we run the submit function.
262 // Normally the submit function should transfer the span to the thread task as the
263 // active span.
264 auto scope = TraceTaskSubmitted(task.get(), span_);
265#endif
266 running_tasks_++;
267 lk.unlock();
268 return DoSubmitTask(std::move(task));
269 }
270
271 Future<> finished_ = Future<>::Make();
272 // The initial task is our first task

Callers

nothing calls this directly

Calls 4

TraceTaskSubmittedFunction · 0.85
IsStopRequestedMethod · 0.80
PollMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected