Open BartMassey opened 4 years ago
Maybe it's a good idea to improve the libstd implementation?
I.e. instead of using BufWriter
on top of LineWriter
, write a new struct dedicated for stdout which skips line scanning it is large enough.
Maybe! But I think a real issue is that the program should get to choose what buffering algorithm is used. This has worked out real well for UNIX, and I see no reason why it is not the idea here. No heuristic is needed except as a default: let the program override it.
Mostly, I need to find a student to work on this with me :grinning:
Maybe something like rawStdin()
, rawStdout()
and rawStderr()
which has no buffering and simply writes to underlying c FILE*
directly?
Aha just realized that there are issues related to that in rust and you havealready commented there https://github.com/rust-lang/rust/issues/58326
And there's an ongoing proposal under discussion https://github.com/rust-lang/libs-team/issues/148
Also a PR to change stdout to use block buffering if stdout is not interactive https://github.com/rust-lang/rust/issues/60673
Boy has this project gotten stalled. Need to go back to it. Apologies.