class

Scroll::Runner

Inherits Reference < Object

Ties the pieces together.

The hot path (STDIN -> STDOUT) runs in the main fiber and is never gated on the display. Buffers are drawn from a fixed pool; the hot path hands a filled buffer to the render fiber, tagged with its stream offset, and grabs a fresh one for the next read. When the render fiber falls behind, the pool empties; the hot path then reads into a reserved buffer that is written to STDOUT and discarded (not handed off). STDOUT stays at full speed and the skipped bytes simply never reach the display, which the Tail detects as an offset gap.

Constants

CHUNK_SIZE = 64 * 1024
POOL_SIZE = 8

Constructors

new(config : CLI)
Source

Class methods

build_source(config : CLI) : Source

STDIN by default; a followed file when --file is set.

Source
display_enabled?(force : Bool, suppress_stdout : Bool, stderr_tty : Bool, stdout_tty : Bool) : Bool

Whether the STDERR tail display runs. When STDOUT is suppressed there is no passthrough to collide with, so the same-terminal suppression is lifted.

Source
progress_total(config : CLI) : Tuple(Progress::Total, Array(String))

The resolved progress total, plus warnings about any size option it had to ignore. --file-size is read here rather than at parse time, so a file that disappears in between degrades to an unknown size instead of an error.

Source
suppress_stdout?(null_pref : Bool | Nil, mode_implies_null : Bool) : Bool

Should STDOUT be suppressed? User intent (nil/true/false) resolved against whether the active mode implies null. --no-null (false) always wins.

Source
terminal_progress?(preference : Bool | Nil, stderr_tty : Bool) : Bool

Whether to drive the terminal's own progress indicator. An explicit --terminal-progress or --no-terminal-progress settles it and the terminal is never queried; left alone, the terminal is asked to name itself and only the few known to show it are driven.

Source

Instance methods

Nested types