Document buffering behaviour fot Stdout(Lock)
#137628
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
A-io
Area: `std::io`, `std::fs`, `std::net` and `std::path`
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Location
Stdout
documentationStdoutLock
documentation`Summary
The handles provided by
std::io::stdout()
are line-buffered, but there is nothing in the documentation suggesting this. The only mention of buffering forstdout
in the documentation is the lineI don't think this is very clear that
stdout
is buffered from this, nor that it uses line buffering.Moreover, the comments for
LineWriterShim
suggest that this mechanism can be used to alternate between line buffering and block buffering forStdout
, which isn't mentioned in the documentation forStdout
at all.I do not mean to relitigate whether or not it should be buffered (previous discussion in #23818) but I'd like to clarify how it is buffered, and how one should deal with it.
The text was updated successfully, but these errors were encountered: