Skip to content

Commit d8d36eb

Browse files
author
Rafał Hibner
committed
Fix concurrent access to backpressure_future_
1 parent 51596f5 commit d8d36eb

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

cpp/src/arrow/acero/asof_join_node.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,13 @@ class AsofJoinNode : public ExecNode {
10621062
bool Process() {
10631063
// Process batches while we have data
10641064
for (;;) {
1065-
backpressure_future_.Wait();
1065+
Future<> to_wait;
1066+
{
1067+
std::lock_guard<std::mutex> lg(backpressure_mutex_);
1068+
to_wait = backpressure_future_;
1069+
}
1070+
to_wait.Wait();
1071+
10661072
Result<std::shared_ptr<RecordBatch>> result;
10671073
{
10681074
std::lock_guard<std::mutex> guard(gate_);

0 commit comments

Comments
 (0)