Control flushing to stdout... core.osthread.Thread + arsd.terminal

Adam D. Ruppe destructionator at gmail.com
Fri Jun 5 12:28:17 UTC 2020


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.


More information about the Digitalmars-d-learn mailing list