Noticed flushout is used in noisy-each. Trying to understand what the deciding factors are for using this ? Hoping someone can shed light on it's value / usage.
Normally Arc will flush all output for you. Thus if you say
arc> (do (repeat 5
(pr ".")
(sleep 1))
(prn))
you will see a dot being printed every second.
However, it can be inefficient to writing every little string constantly. If you'd prefer to call flush yourself, you can say:
arc> (declare 'explicit-flush #t)
now Arc won't call flush for you. If you run the above example again, you won't see one dot per second; instead you'll see nothing for five seconds and then all the dots will be printed at once.
Since noisy-each might be called with explicit-flush on, it calls flush to ensure that the dots are printed as it runs. This does no harm when explicit-flush is off.