Closed maxime-pigeon closed 4 months ago
This seems to be due to buffering, and not really a web server issue. Calling (flush-output)
to forcefully flush the output port will fix your problem.
I see. Thanks for the response! For future reference (if anyone else encounters this ‘issue’): https://docs.racket-lang.org/reference/port-buffers.html#(part._port-buffers. Also, writeln
, println
and displayln
flushes the buffer.
I tried executing this program using
racket
on macOS from iTerm:It works in DrRacket, but not in the terminal. The output is printed only once the server is closed.