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

Method SubmitTaskUnlocked

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

Source from the content-addressed store, hash-verified

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