[plt-scheme] interleaving the I and O in I/O

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Fri Feb 1 11:09:58 EST 2008

Prabhakar Ragde wrote:
>
> So, a followup I should have asked at the time: is there any way for 
> the user to modify this behaviour? Specifically, I want to avoid 
> having the current output port flushed every time there is a read. --PR

If you are not output to the interaction session, than just use (output 
... your-port) instead of using the current output port. Even if you do 
want to output to the interaction session, the following code will can 
do the trick:

(define output-port (current-output-port))
(current-output-port (make-output-port #f always-evt void void))

Chongkai



Posted on the users mailing list.