Skip to main content

maybe_guard_stream

Function maybe_guard_stream 

Source
fn maybe_guard_stream(
    stream: SendableRecordBatchStream,
    permit: Option<OwnedSemaphorePermit>,
) -> SendableRecordBatchStream
Expand description

Wraps stream so it holds permit until fully consumed. Returns stream unchanged when no permit was acquired (limiter disabled).