Skip to main content

Module pipe

Module pipe 

Source
Expand description

Blocking Read and Write ends of async streams.

The tar code is synchronous and runs in spawn_blocking. These types move its bytes through async streams one chunk at a time, so memory stays bounded. Every wait ends when the transfer is cancelled or when no bytes moved for the stall time.

Structs§

SyncReader
Reads the chunks of an async stream.
SyncWriter
Sends what is written to a bounded channel, in chunks.

Constants§

CHANNEL_CHUNKS
Chunks a transfer channel holds before the writer waits.
CHUNK
Size of the chunks a SyncWriter sends.
STALL
Longest a transfer waits for bytes to move before it fails.