6

What is the way to print data on standard output without buffering? println buffers data and writes them all together.

Equivalently a command to empty the print buffer would be useful.

user25004
  • 1,868
  • 1
  • 22
  • 47
  • It would be great if there was an option (command line flag?) to disable output buffering entirely, without having to add flush commands through an entire program. – Time4Tea Mar 07 '23 at 13:33

1 Answers1

6

flush is the command to empty the print buffer for a given stream: https://docs.julialang.org/en/v1/base/io-network/#Base.flush

Gord Stephen
  • 965
  • 11
  • 15
ptb
  • 2,138
  • 1
  • 11
  • 16