[zeromq-dev] ZMQ_SERVER blocks on send() rather than returning EAGAIN
Pieter Hintjens
ph at imatix.com
Mon Apr 4 12:39:16 CEST 2016
Doron, we need to fix the man page then. Can you read the RFC
http://rfc.zeromq.org/spec:41 and tell me which pieces exactly are
incorrect? I'll do the rest.
On Mon, Apr 4, 2016 at 10:04 AM, Doron Somech <somdoron at gmail.com> wrote:
> You have to specify ZMQ_DONT_WAIT for the send method to return eagain
> instead of blocking.
>
> On Mon, Apr 4, 2016 at 5:31 AM, Robert Holterhoff <datax1969 at gmail.com>
> wrote:
>>
>> I'm using the "unstable" 4.2.0 release and have a question regarding
>> ZMQ_SERVER sockets.
>>
>> The documentation suggests that ZMQ_SERVER sockets will not block but
>> return EAGAIN when the HWM is reached. I am finding that the send()
>> blocks instead.
>>
>> Actually, this is exactly the behaviour I want so I'm not complaining. My
>> app works beautifully, running at full rate, quickly filling up various
>> clients queues and then automatically rate-limiting to the slowest client
>> because of the blocking behaviour.
>>
>> However, I made the observation that the "back-off" part of the code which
>> I had written expecting EGAIN to be returned is never exercised.
>>
>> I just want to know if I can rely on this behaviour in the future so I can
>> remove my hacky arbitrary "sleep-for-a-bit back-off" code, or if this is a
>> bug because SERVER/CLIENT sockets are still in their infancy.
>>
>> Thanks,
>>
>> Rob Holterhoff
>>
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
More information about the zeromq-dev
mailing list