On Wed, Sep 4, 2013 at 12:56 AM, Simon Yarde <simonya...@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.

G
-- 
Gregory Collins <g...@gregorycollins.net>
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to