Skip to main content

Module wait

Module wait 

Source
Expand description

Lines a tool prints to say it is waiting on a lock (ADR-0009, hooks.liveness): the vocabulary, the framing that finds them in a stream of bytes, and nothing that touches a clock.

Two tiers, deliberately. A marker is a line the real binary prints, matched exactly, and it pauses the silence clock: the tool has said what it is doing and the clock would otherwise call that stuck. A line that merely looks like a wait earns one retry after a silence kill and nothing more, because a loose match on lock would also pause the clock for a test suite whose test ids contain the word.

Structs§

LineFramer
Turns a stream of byte chunks into complete lines, one chunk at a time. What the stderr reader hands to marker.

Enums§

CargoLockWhat
Which cargo lock a Blocking waiting for file lock on … line names.
WaitKind
A declared wait: the tool and, where it says, the lock.

Constants§

MAX_LINE
The longest line the framer keeps while waiting for its newline. A tool that writes more than this without a newline is not printing status lines; the fragment is dropped rather than grown.

Functions§

looks_like_wait
Whether a line reads like a wait, loosely: whole phrases only, so a test id such as test_lock.py::x or a file named lock.rs is not one. The second tier — what earns one retry after a silence kill, never a pause.
marker
The exact line a tool prints while it waits on a lock, or None.
strip_csi
line without its CSI escape sequences (ESC [ … m and the rest of the family), so a tool told CARGO_TERM_COLOR=always still matches. Only the ESC [ form: that is what colour is, and a stray lone ESC is kept as text rather than guessed at.