From 6e8693b297a841e8ada1828820136c850b793158 Mon Sep 17 00:00:00 2001 From: Richo Healey Date: Sat, 28 Mar 2015 23:50:02 -0700 Subject: [PATCH] std: Add a note about the print! macro and output buffering --- src/libstd/macros.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 52492a019a298..645bc5db753d0 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -64,6 +64,10 @@ macro_rules! panic { /// /// Equivalent to the `println!` macro except that a newline is not printed at /// the end of the message. +/// +/// Note that stdout is frequently line-buffered by default so it may be +/// necessary to use `io::stdout().flush()` to ensure the output is emitted +/// immediately. #[macro_export] #[stable(feature = "rust1", since = "1.0.0")] #[allow_internal_unstable]