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

Method EndFromProcessThread

cpp/src/arrow/acero/asof_join_node.cc:1038–1055  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1036 };
1037
1038 void EndFromProcessThread(Status st = Status::OK()) {
1039 // We must spawn a new task to transfer off the process thread when
1040 // marking this finished. Otherwise there is a chance that doing so could
1041 // mark the plan finished which may destroy the plan which will destroy this
1042 // node which will cause us to join on ourselves.
1043 ARROW_UNUSED(
1044 plan_->query_context()->executor()->Spawn([this, st = std::move(st)]() mutable {
1045 Defer cleanup([this, &st]() { process_task_.MarkFinished(st); });
1046 if (st.ok()) {
1047 st = output_->InputFinished(this, batches_produced_);
1048 }
1049 for (size_t i = 0; i < state_.size(); ++i) {
1050 const auto& s = state_[i];
1051 s->ForceShutdown();
1052 st &= inputs_[i]->StopProducing();
1053 }
1054 }));
1055 }
1056
1057 bool CheckEnded() {
1058 if (state_.at(0)->Finished()) {

Callers

nothing calls this directly

Calls 9

query_contextMethod · 0.80
OKFunction · 0.50
executorMethod · 0.45
MarkFinishedMethod · 0.45
okMethod · 0.45
InputFinishedMethod · 0.45
sizeMethod · 0.45
ForceShutdownMethod · 0.45
StopProducingMethod · 0.45

Tested by

no test coverage detected