MCPcopy Create free account
hub / github.com/bytedance/bolt / enqueuePartitionedOutputLocked

Method enqueuePartitionedOutputLocked

bolt/exec/OutputBuffer.cpp:522–540  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520}
521
522void 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
542void OutputBuffer::noMoreData() {
543 // Increment number of finished drivers.

Callers

nothing calls this directly

Calls 5

getAndClearNotifyMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45
enqueueMethod · 0.45

Tested by

no test coverage detected