Skip to main content

pipe_stream

Function pipe_stream 

Source
pub fn pipe_stream(capacity: usize) -> (PipeWriter, PipeReader)
Expand description

Create a bounded pipe stream pair with the given capacity.

The writer blocks when the buffer is full (backpressure). The reader blocks when the buffer is empty. Dropping the writer signals EOF; dropping the reader signals broken pipe.