<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 4, 2013 at 12:56 AM, Simon Yarde <span dir="ltr">&lt;<a href="mailto:simonyarde@me.com" target="_blank">simonyarde@me.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What&#39;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.</blockquote>
</div><br>If the underlying write operation returns EWOULDBLOCK then the &quot;send&quot; function calls into the GHC IO manager with &quot;threadWaitWrite&quot;, which registers interest in the file descriptor using epoll() and blocks the calling Haskell thread until the socket is writable.<br>
<br clear="all"><div>G</div>-- <br>Gregory Collins &lt;<a href="mailto:greg@gregorycollins.net" target="_blank">greg@gregorycollins.net</a>&gt;
</div></div>