[Haskell-cafe] Race conditions with threadWait(Read/Write) and closeFdWith

Brandon Allbery allbery.b at gmail.com
Mon Sep 1 23:20:40 UTC 2014


On Mon, Sep 1, 2014 at 7:13 PM, John Lato <jwlato at gmail.com> wrote:

> I seem to recall that there are some other issues that arise if you
> attempt to mix these low-level fd calls with higher-level fd operations,
> but that was two IO managers ago so those concerns may be out of date.
>
>
There are *always* issues with mixing low-level and high-level I/O,
especially if the high-level I/O is buffered. It's best to not mix them.
(Note that using handleToFd will safely give you something that you can do
low level I/O with and will close the Handle; fdToHandle can't stop you
from mixing them, though.)

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140901/e46219a6/attachment.html>


More information about the Haskell-Cafe mailing list