TermBuf::Input::Reader
The fibre that reads the terminal and nothing else.
It does no decoding, which is the point: a read from a real device blocks its thread, so the only thing that should happen on that thread is the read. What comes back goes onto a channel and someone else's fibre makes sense of it.
Constants
One read's worth. Large enough that a paste arrives in few enough pieces to be cheap, small enough to cost nothing when idle.
Reads waiting to be decoded. Once this fills the reader stops reading, which is the right way round: the kernel's own buffer then applies backpressure to the keyboard rather than memory growing here.
Constructors
Instance methods
Starts reading.
A blocking read on a real device needs a thread of its own, or it stalls every fibre sharing one. An in-memory stream returns straight away and does not.