[Haskell-cafe] Unexpected behaviour with send and send-buffer setting

Gregory Collins greg at gregorycollins.net
Wed Sep 4 01:49:01 CEST 2013

On Wed, Sep 4, 2013 at 12:56 AM, Simon Yarde <simonyarde at me.com> wrote:

> What's going on?  I expected the second and third send operation to return
> 0 bytes sent, because the send buffer can only hold 1 byte.

If the underlying write operation returns EWOULDBLOCK then the "send"
function calls into the GHC IO manager with "threadWaitWrite", which
registers interest in the file descriptor using epoll() and blocks the
calling Haskell thread until the socket is writable.

Gregory Collins <greg at gregorycollins.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130904/88b9fc83/attachment.htm>

More information about the Haskell-Cafe mailing list