cvs commit: fptools/libraries/base/GHC IO.hs
Simon Marlow
simonmar@glass.cse.ogi.edu
Wed, 30 Apr 2003 01:36:23 -0700
simonmar 2003/04/30 01:36:22 PDT
Modified files:
libraries/base/GHC IO.hs
Log:
When doing hGetChar on a block-buffered handle, don't wait for the
buffer to be completely full before returning a character. This
behaviour seems more useful, and matches what hGetLine and
hGetContents do.
Without this, to do an unbuffered read you have to set the buffering
on the Handle to NoBuffering, which adversely affects the performance
of writes. With this change, there is now no difference between line
buffering and block buffering for read operations.
Possibly fillReadBuffer can now be simplified, since the is_line
parameter is always True. However, this is a delicate part of the IO
library, and I don't want to remove the possiblity of forcing a
complete buffer-fill in the future.
Revision Changes Path
1.13 +3 -1 fptools/libraries/base/GHC/IO.hs