diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-29 11:10:32 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-29 14:30:01 -0300 |
| commit | e91a3788752c63c2ed086c553f9861056172e8c0 (patch) | |
| tree | 2ce56163ac525b6772737a0cbc44ae5deb3c08d4 /src/web/libc/include | |
| parent | 97f83717cf8be3e4eedd3f7b932766c1cf72fd37 (diff) | |
| download | pardes-e91a3788752c63c2ed086c553f9861056172e8c0.tar.gz pardes-e91a3788752c63c2ed086c553f9861056172e8c0.zip | |
tty: a pane flooded with output (`yes`) is read on to its end, not left blocked for good while keys still work
vaxis's event queue woke one blocked writer, and only on the pop from full. The tty's loop has two writers on it: a pane's pty reader, and the input reader posting the wake for a frame's answered status request (FrameAck). Under `yes` both block on the full queue; the loop then takes a whole batch, its first pop wakes one of them, the rest wake no one, and the pty reader waits for good: the program in the pane blocks writing to its pty, the pane stops moving, and every key still works. It happened from about 400 KB of output, every time at 1 MB, through the snapshot harness's pty as through a terminal.
build.zig patches vaxis's src/queue.zig at build time, count-checked as its Parser.zig and Vaxis.zig are: a pop that makes room wakes every blocked writer. A test (src/vaxis_input.zig) empties a full queue in one batch with two writers waiting and requires both to land. `yes | head -c N` through a bash pane in tty mode now finishes at 1 MB, 10 MB, 100 MB (16 s) and 1 GB (179 s, test/perf.zig --live).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/web/libc/include')
0 files changed, 0 insertions, 0 deletions
