Commit c4ebb77
fix(stdio): allow configurable memory-stream buffer size
Add read_stream_buffer_size and write_stream_buffer_size parameters to
stdio_server() so callers can increase the internal memory-object-stream
capacity. The default (0 = synchronous hand-off) is preserved for
backward compatibility.
With max_buffer_size=0 the stdin reader blocks whenever the message
processor is busy, making the server unresponsive to pings and new
requests during slow operations. A small buffer (e.g. 8) decouples
reading from processing and lets the server remain responsive.
Closes #1333
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 62575ed commit c4ebb77
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| |||
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
52 | | - | |
53 | | - | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| |||
0 commit comments