Skip to content

stdin: apply highwater backpressure to the pipe FileReader source - #35977

Merged
Jarred-Sumner merged 4 commits into
mainfrom
farm/c4f90ada/stdin-pipe-backpressure
Jul 27, 2026
Merged

stdin: apply highwater backpressure to the pipe FileReader source#35977
Jarred-Sumner merged 4 commits into
mainfrom
farm/c4f90ada/stdin-pipe-backpressure

io(posix): move the already-armed short-circuit from register_poll to…

a772e2f
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 26, 2026 in 24m 7s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/io/PipeReader.rs:464-468 a772e2f partially reverts the double-epoll_ctl fix for read_blocking_pipe

Annotations

Check warning on line 468 in src/io/PipeReader.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

a772e2f5 partially reverts the double-epoll_ctl fix for read_blocking_pipe

a772e2f5 partially reverts the double-epoll_ctl fix for the `read_blocking_pipe` ordering: there `on_read_chunk → p.run() → re-entrant on_pull → watch()` runs while `NeedsRearm` is still set (so `is_watching()` is false → epoll_ctl #1), then the loop's own `if !received_hup { register_poll() }` fires unguarded (epoll_ctl #2). The guard in `watch()` only covers the `read_with_fn` ordering (register_poll runs *before* the re-entrant `on_pull`). Duplicating the `is_watching()` short-circuit in `reg