| 427 | |
| 428 | private: |
| 429 | void EndFromProcessThread(arrow::Status st = arrow::Status::OK()) { |
| 430 | ARROW_CHECK(!cleanup_started); |
| 431 | for (size_t i = 0; i < input_counter.size(); ++i) { |
| 432 | ARROW_CHECK(input_counter[i] == output_counter[i]) |
| 433 | << input_counter[i] << " != " << output_counter[i]; |
| 434 | } |
| 435 | |
| 436 | #ifdef ARROW_ENABLE_THREADING |
| 437 | ARROW_UNUSED( |
| 438 | plan_->query_context()->executor()->Spawn([this, st = std::move(st)]() mutable { |
| 439 | Defer cleanup([this, &st]() { process_task.MarkFinished(st); }); |
| 440 | if (st.ok()) { |
| 441 | st = output_->InputFinished(this, batches_produced); |
| 442 | } |
| 443 | })); |
| 444 | #else |
| 445 | process_task.MarkFinished(st); |
| 446 | if (st.ok()) { |
| 447 | st = output_->InputFinished(this, batches_produced); |
| 448 | } |
| 449 | #endif |
| 450 | } |
| 451 | |
| 452 | bool CheckEnded() { |
| 453 | bool all_finished = true; |
nothing calls this directly
no test coverage detected