Skip to content

Commit b46311c

Browse files
author
Rafał Hibner
committed
Wait for process_task to be marked finished
EndFromProcessThread spawns function using asof_join_node that can outlive the node itself. Wait for task to be marked finished. Also mark finished in case node was never started.
1 parent 7f645d4 commit b46311c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cpp/src/arrow/acero/asof_join_node.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,7 @@ class AsofJoinNode : public ExecNode {
11511151
process_thread_.join();
11521152
}
11531153
#endif
1154+
process_task_.Wait();
11541155
}
11551156

11561157
const std::vector<col_index_t>& indices_of_on_key() { return indices_of_on_key_; }
@@ -1593,7 +1594,8 @@ AsofJoinNode::AsofJoinNode(ExecPlan* plan, NodeVector inputs,
15931594
#ifdef ARROW_ENABLE_THREADING
15941595
,
15951596
process_(),
1596-
process_thread_()
1597+
process_thread_(),
1598+
process_task_(Future<>::MakeFinished())
15971599
#endif
15981600
{
15991601
for (auto& key_hasher : key_hashers_) {

0 commit comments

Comments
 (0)