On Friday, 5 June 2020 at 12:28:17 UTC, Adam D. Ruppe wrote:
On Friday, 5 June 2020 at 11:45:31 UTC, aberba wrote:
How can I make Thread.sleep() only run AFTER "Wait, signing you in ..." is written (force flushed) to stdout?

just use explicit `terminal.flush();` any time you want the output to appear immediately.

Terminal does its own aggressive buffering internally (which I kinda regret) and only flushes with 1) it is full or 2) you ask for input, unless you call that flush function.

Ooop. Forgot to say thanks. Thanks, works as expected now.

Didn't come to mind to lookup from terminal docs. Thought it was a Dlang/OS problem.

Reply via email to