diff --git a/cpp/src/arrow/acero/asof_join_node.cc b/cpp/src/arrow/acero/asof_join_node.cc index c4f11d01f3d5c..d8523a074b21d 100644 --- a/cpp/src/arrow/acero/asof_join_node.cc +++ b/cpp/src/arrow/acero/asof_join_node.cc @@ -1136,7 +1136,9 @@ class AsofJoinNode : public ExecNode { virtual ~AsofJoinNode() { #ifdef ARROW_ENABLE_THREADING PushProcess(false); + if(process_thread_.joinable()){ process_thread_.join(); + } #endif }