You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Documentation for stdout does not mention flushing #74348
The documentation for std::io::stdout() does not mention "flush" anywhere, neither does Stdout or StdoutLock. I think it would be helpful for the documentation to indicate the behaviour, i.e. if it should be flushed manually or it's flushed once it goes out of scope.
The same would apply for stderr. I'm not sure if the behaviour of #23205 has changed since, or whether not documenting flushing was an oversight or intended to allow breakage in that regard.
A buffered output stream collects output into a buffer before sending it on to the real output, which ultimately happens via a call to the kernel. It prevents the inefficiency of a kernel call for each character, but has the added complexity of needing to output the contents of its buffer to the real output. This is called flushing the buffer. Output that gets added to the buffer but not flushed will not really be output and will not be seen on the screen or written to disk as the case may be.
Activity
hkBst commentedon Feb 5, 2025
A buffered output stream collects output into a buffer before sending it on to the real output, which ultimately happens via a call to the kernel. It prevents the inefficiency of a kernel call for each character, but has the added complexity of needing to output the contents of its buffer to the real output. This is called flushing the buffer. Output that gets added to the buffer but not flushed will not really be output and will not be seen on the screen or written to disk as the case may be.
No other knowledge seems necessary, so
@rustbot label E-easy
pcorwin commentedon Feb 10, 2025
@rustbot claim
Rollup merge of rust-lang#136798 - pcorwin:master, r=tgross35
Auto merge of rust-lang#138020 - workingjubilee:rollup-eva637e, r=wor…
Rollup merge of rust-lang#136798 - pcorwin:master, r=tgross35
Auto merge of rust-lang#138030 - workingjubilee:rollup-9rrqat7, r=wor…
Rollup merge of rust-lang#136798 - pcorwin:master, r=tgross35
Auto merge of rust-lang#138044 - workingjubilee:rollup-lf771sb, r=wor…
Rollup merge of rust-lang#136798 - pcorwin:master, r=tgross35
Auto merge of rust-lang#138058 - jieyouxu:rollup-skdt0oz, r=jieyouxu
Unrolled build for rust-lang#136798
Rollup merge of rust-lang#136798 - pcorwin:master, r=tgross35