| 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 |
nothing calls this directly
no test coverage detected