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

Method ProcessNonThreaded

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

Source from the content-addressed store, hash-verified

1465
1466#ifndef ARROW_ENABLE_THREADING
1467 bool ProcessNonThreaded() {
1468 while (!process_task_.is_finished()) {
1469 Result<std::shared_ptr<RecordBatch>> result = ProcessInner();
1470
1471 if (result.ok()) {
1472 auto out_rb = *result;
1473 if (!out_rb) break;
1474 ExecBatch out_b(*out_rb);
1475 out_b.index = batches_produced_++;
1476 DEBUG_SYNC(this, "produce batch ", out_b.index, ":", DEBUG_MANIP(std::endl),
1477 out_rb->ToString(), DEBUG_MANIP(std::endl));
1478 Status st = output_->InputReceived(this, std::move(out_b));
1479 if (!st.ok()) {
1480 // this isn't really from a thread,
1481 // but we call through to this for consistency
1482 EndFromSingleThread(std::move(st));
1483 return false;
1484 }
1485 } else {
1486 // this isn't really from a thread,
1487 // but we call through to this for consistency
1488 EndFromSingleThread(result.status());
1489 return false;
1490 }
1491 }
1492 auto& lhs = *state_.at(0);
1493 if (lhs.Finished() && !process_task_.is_finished()) {
1494 EndFromSingleThread(Status::OK());
1495 }
1496 return true;
1497 }
1498
1499 void EndFromSingleThread(Status st = Status::OK()) {
1500 process_task_.MarkFinished(st);

Callers

nothing calls this directly

Calls 7

OKFunction · 0.50
is_finishedMethod · 0.45
okMethod · 0.45
ToStringMethod · 0.45
InputReceivedMethod · 0.45
statusMethod · 0.45
FinishedMethod · 0.45

Tested by

no test coverage detected