Essentially, disabling buffering is good when you want to see results right away in a function that could take a very long time to fill (and thus, flush) the print buffer.
You also want to turn off buffering when communicating through TCP/IP sockets and the like. With the typical four letter commands in TCP/IP communication, you probably don't want to wait for an 8 kilobyte buffer to fill before sending it to the remote server.
Leaving buffering enabled is good when you're working with the filesystem.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.