Expand description
Remote files downloaded to local ones, and standard input spooled to one.
A download is read on one side and written on the thread that asked, never on a
runtime worker, with at most QUEUED_CHUNKS waiting between the two: a full
queue stops the reading, so a slow disk holds the transfer back instead of the
file piling up in memory. A store’s stream is polled on the app’s runtime; a
blocking reader (HTTP, standard input) runs on a thread of its own.
Structs§
- Temp
Download - A downloaded file, removed from disk when its last holder drops it: the app keeps one to read the file again, the dataset scanning it keeps another, and an event carrying one that is never handled removes it as it drops.
Enums§
- Stream
Error - Why a download did not arrive whole.
Constants§
- QUEUED_
CHUNKS - Chunks queued between the side reading a download and the thread writing it.
Functions§
- read_
into - Run
openon a thread of its own and hand each chunk read from the reader it answers with towriteon this thread, in order. Returns the bytes written; a lengthopengives must be what arrives. - stream_
into - Run
openonruntimeand hand each chunk of the stream it answers with towriteon this thread, in order. Returns the bytes written.
Type Aliases§
- Opened
- What opening a download answers: its stream or reader and its length, when the source gave one, or why it could not be opened.