PROPOSAL(S): threadWaitError and threadWaitErrorSTM

Andreas Voellmy andreas.voellmy at gmail.com
Mon Mar 17 13:23:10 UTC 2014


Hi Merijn,

I see how you'd wait for exceptional conditions using select(). Epoll is a
bit different... How would you do it with epoll? Is it using the EPOLLPRI
event type?

Andi


On Sun, Mar 16, 2014 at 1:16 PM, Merijn Verstraaten
<merijn at inconsistent.nl>wrote:

> I just went with the common documentation name, I know this includes
> out-of-band data, etc. If it makes you happier, feel free to consider this
> proposal with s/Error/Exceptional, regardless of how it's called, it'd be
> nice if we could use this from within Haskell.
>
> Cheers,
> Merijn
>
>
> On Mar 16, 2014, at 16:09 , Brandon Allbery wrote:
>
> On Sun, Mar 16, 2014 at 10:25 AM, Merijn Verstraaten <
> merijn at inconsistent.nl> wrote:
>
>> threadWaitError :: Fd -> IO ()
>> threadWaitErrorSTM :: Fd -> IO (STM (), IO ())
>>
>> to allow for blocking on detecting error condition on file descriptors,
>> similar to what C's select() allows.
>>
>
> If you mean the third bitmask, it is not for errors (notwithstanding the
> documentation on some systems); an "exceptional condition" is not an error,
> it's MSG_OOB data. Errors show as "ready" on the appropriate mask (read or
> write) since a read (resp. write) will return immediately with the error
> instead of blocking.
>
> See
> http://stackoverflow.com/questions/1342712/nix-select-and-exceptfds-errorfds-semanticsand
> http://man7.org/linux/man-pages/man2/select_tut.2.html for more
> information.
>
> --
> brandon s allbery kf8nh                               sine nomine
> associates
> allbery.b at gmail.com
> ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140317/62088340/attachment.html>


More information about the Libraries mailing list