diff --git a/cpp/src/arrow/c/bridge.cc b/cpp/src/arrow/c/bridge.cc index b293d914b0fea..8eaef0225d243 100644 --- a/cpp/src/arrow/c/bridge.cc +++ b/cpp/src/arrow/c/bridge.cc @@ -2570,8 +2570,8 @@ class AsyncRecordBatchIterator { state_->producer_->request(state_->producer_, 1); ArrowDeviceArray out; if (task.first.extract_data(&task.first, &out) != 0) { - std::unique_lock lock(state_->mutex_); - state_->cv_.wait(lock, [&] { return !state_->error_.ok(); }); + std::unique_lock lock(state_->mutex_); + state_->cv_.wait(lock, [&] { return !state_->error_.ok(); }); return state_->error_; }