Page 1 of 1

Immediate output instead of waiting for the script to finish

Posted: Thu Mar 17, 2016 6:15 am
by Lispeth
Hi, everyone,

as I'm currently writing a long(ish) command-line tool in SBCL, I noticed that all output is queued until the script finishes or signals an unhandled condition. I'd prefer to see some "progress" though. Is there a way to force immediate output of (print)s and (format)s?

Re: Immediate output instead of waiting for the script to fi

Posted: Thu Mar 17, 2016 6:49 am
by Goheeca
There are functions for a buffer manipulation, force-output is probably what are you looking for.

Re: Immediate output instead of waiting for the script to fi

Posted: Thu Mar 17, 2016 7:34 am
by Lispeth
Looks exactly like what I want, thanks!

But I'm not quite sure about the difference between force-output and finish-output yet. Am I right that finish-output resets the buffer while force-output does not?

Re: Immediate output instead of waiting for the script to fi

Posted: Fri Mar 18, 2016 12:29 am
by Goheeca
finish-output is a blocking call and force-output is a non-blocking call.

Re: Immediate output instead of waiting for the script to fi

Posted: Fri Mar 18, 2016 1:11 am
by Lispeth
Ah, thanks. :)