| 75 | explicit SequencingQueueImpl(Processor* processor) : processor_(processor) {} |
| 76 | |
| 77 | Status InsertBatch(ExecBatch batch) override { |
| 78 | DCHECK_NE(::arrow::compute::kUnsequencedIndex, batch.index); |
| 79 | std::unique_lock lk(mutex_); |
| 80 | if (batch.index == next_index_) { |
| 81 | return DeliverNextUnlocked(std::move(batch), std::move(lk)); |
| 82 | } |
| 83 | queue_.emplace(std::move(batch)); |
| 84 | return Status::OK(); |
| 85 | } |
| 86 | |
| 87 | private: |
| 88 | Status DeliverNextUnlocked(ExecBatch batch, std::unique_lock<std::mutex>&& lk) { |