[Haskell-cafe] How can I avoid buffered reads?

Tristan Seligmann mithrandi at mithrandi.net
Thu Dec 6 21:24:11 CET 2012


On 29 Nov 2012 12:27 PM, "Leon Smith" <leon.p.smith at gmail.com> wrote:
>
> Well,  I took Bardur's suggestion and avoided all the complexities of
GHC's IO stack and simply used System.Posix.IO and Foreign.    This appears
to work,  but for better or worse,   it is using blocking calls to the
"read" system call and is not integrated with GHC's IO manager.   This
shouldn't be an issue for my purposes,  but I suppose it's worth pointing
out.

Reading from an fd corresponding to an actual file is always blocking.
select() will always indicate that the fd is ready for reading and writing,
and I think epoll() will refuse to operate on the fd at all.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121206/9453fd7f/attachment.htm>


More information about the Haskell-Cafe mailing list