| 520 | } |
| 521 | |
| 522 | void OutputBuffer::enqueuePartitionedOutputLocked( |
| 523 | int destination, |
| 524 | std::unique_ptr<SerializedPage> data, |
| 525 | std::vector<DataAvailable>& dataAvailableCbs) { |
| 526 | BOLT_DCHECK(isPartitioned()); |
| 527 | BOLT_CHECK_NULL(arbitraryBuffer_); |
| 528 | BOLT_DCHECK(dataAvailableCbs.empty()); |
| 529 | |
| 530 | BOLT_CHECK_LT(destination, buffers_.size()); |
| 531 | auto* buffer = buffers_[destination].get(); |
| 532 | if (buffer != nullptr) { |
| 533 | buffer->enqueue(std::move(data)); |
| 534 | dataAvailableCbs.emplace_back(buffer->getAndClearNotify()); |
| 535 | } else { |
| 536 | // Some downstream tasks may finish early and delete the corresponding |
| 537 | // buffers. Further data for these buffers is dropped. |
| 538 | updateStatsWithFreedPagesLocked(1, data->size()); |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | void OutputBuffer::noMoreData() { |
| 543 | // Increment number of finished drivers. |
nothing calls this directly
no test coverage detected