Bun.write: poll instead of spin when a nonblocking stdout pipe returns EAGAIN - #35953
Open
robobun wants to merge 6 commits into
Open
Bun.write: poll instead of spin when a nonblocking stdout pipe returns EAGAIN#35953robobun wants to merge 6 commits into
robobun wants to merge 6 commits into
Claude / Claude Code Review
completed
Jul 26, 2026 in 16m 57s
Code review found 1 potential issue
Found 4 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/runtime/webcore/blob/write_file.rs:341-359 |
Sibling stale-result loop in ReadFile::do_read left unfixed |
Annotations
Check warning on line 359 in src/runtime/webcore/blob/write_file.rs
claude / Claude Code Review
Sibling stale-result loop in ReadFile::do_read left unfixed
The read-side twin `ReadFile::do_read` (read_file.rs:510-556) has the byte-for-byte identical stale-result loop this PR just removed here: `result` is computed once, then `loop { match &result { ... } }` with an `io::RETRY && !could_block => continue` arm that re-matches the cached error forever without re-issuing the syscall. Per the repo's "fix the whole class" rule it's worth applying the same three-line reshaping (drop the loop; on RETRY set `could_block = true` and `wait_for_readable()`). T
Loading