
On Mon, Aug 23, 2010 at 8:51 AM, Simon Marlow
Hmm, RawIO.read looks ok:
-- | Read up to the specified number of bytes, returning the number -- of bytes actually read. This function should only block if there -- is no data available. If there is not enough data available, -- then the function should just return the available data. A return -- value of zero indicates that the end of the data stream (e.g. end -- of file) has been reached.
that seems pretty clear to me. No?
It says that it "should only block if there is no data available". I assumed that fillReadBuffer has the same semantics. If both do not block if there is data, then hGetBuf would not wait for the buffer to be filled, if I am reading its source correctly [1]. Either they do block until the buffer is filled, or I'm misreading hGetBuf/bufRead. =) [1] http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/src/GHC-I... Cheers! =) -- Felipe.