3 ms·
You might not fill the buffer. But your program might crash before the buffer is flushed. In that case having prints explicitly block until the IO is completed
by avianlyric 3y ago
You might not fill the buffer. But your program might crash before the buffer is flushed. In that case having prints explicitly block until the IO is completed is very valuable, especially when debugging. Nobody wants to waste time debugging their debug code.
- withinboredom 3y agoThen just write to stderr, which is unbuffered (usually).