westonpace commented on code in PR #15253: URL: https://github.com/apache/arrow/pull/15253#discussion_r1087260278
########## cpp/src/arrow/compute/exec/asof_join_node.cc: ########## @@ -1100,15 +1100,18 @@ class AsofJoinNode : public ExecNode { ~Defer() noexcept { callable(); } }; - void EndFromProcessThread() { + void EndFromProcessThread(Status st = Status::OK()) { // We must spawn a new task to transfer off the process thread when // marking this finished. Otherwise there is a chance that doing so could // mark the plan finished which may destroy the plan which will destroy this // node which will cause us to join on ourselves. - ErrorIfNotOk(plan_->query_context()->executor()->Spawn([this] { - Defer cleanup([this]() { finished_.MarkFinished(); }); - outputs_[0]->InputFinished(this, batches_produced_); - })); + ARROW_UNUSED( Review Comment: If `Spawn` fails it means the thread pool has shut down. There is no point in marking the plan finished and we might as well avoid an abort here so we don't accidentally hide the true cause. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org