[zeromq-dev] patch: non-blocking tcp accept
ph at imatix.com
Tue Apr 28 13:07:01 CEST 2009
On Tue, Apr 28, 2009 at 12:53 PM, Martin Sustrik <sustrik at fastmq.com> wrote:
> Anyway, it seems that checking for both errors everywhere we are
> checking for one of the two at the moment would yield a sane result.
Historically some platforms treated the two conditions differently
depending on whether or not they had some form of polled asynchronous
I/O. You'd ask for a non-blocking read or write and if no data was
available you'd get EWOULDBLOCK. Clumsy, and happily never became a
In iMatix code we've always treated EGAIN and EWOULDBLOCK as identical
conditions, either of which may occur depending on the platform. "if
(errno == EAGAIN || errno == EWOULDBLOCK)..."
More information about the zeromq-dev