Commit f8d77be
committed
stream: skip zero-byte broadcast writes
Zero-byte writes append entries to the broadcast buffer without
increasing bufferedBytes. This allows write('') and writev([]) to
bypass backpressure and grow the buffer without bound.
Treat zero-byte batches as successful no-ops, matching push streams,
and add coverage for the synchronous and asynchronous writer methods.
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol1 parent 54a5095 commit f8d77be
2 files changed
Lines changed: 27 additions & 1 deletion
File tree
- lib/internal/streams/iter
- test/parallel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
277 | 283 | | |
278 | 284 | | |
279 | 285 | | |
| |||
299 | 305 | | |
300 | 306 | | |
301 | 307 | | |
302 | | - | |
303 | 308 | | |
304 | 309 | | |
305 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
150 | 170 | | |
151 | 171 | | |
152 | 172 | | |
| |||
165 | 185 | | |
166 | 186 | | |
167 | 187 | | |
| 188 | + | |
168 | 189 | | |
169 | 190 | | |
0 commit comments