[Haskell-cafe] Re: [Haskell] Re: ANNOUNCE: enumerator, an
alternative iteratee package
felipe.lessa at gmail.com
Mon Aug 23 07:57:45 EDT 2010
On Mon, Aug 23, 2010 at 8:51 AM, Simon Marlow <marlowsd at gmail.com> wrote:
> 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 . Either they do
block until the buffer is filled, or I'm misreading hGetBuf/bufRead.
More information about the Haskell-Cafe