[zeromq-dev] poll does not return on a SUB socket
Sven Koebnick
sven.koebnick at t-online.de
Thu Dec 16 20:00:35 CET 2010
Hi Martin,
the main issue is, that poll(... ,-1) does not at all return despite
the fact that there is a message available!
The usage of timeout value is a current workaround, because the second
call to poll (the first returned zero) successfully returns a number
greater one.
Sven
===================
sent by the iPhone
Am 16.12.2010 um 13:33 schrieb Martin Sustrik <sustrik at 250bpm.com>:
> Hi Sven,
>
>> In addition, a poll with 180 seconds (an 18 and 7 zeros) does NEVER
>> wait
>> so long, but return immediately. If there is no message available, it
>> returns 0 as expected, but sometimes the ERRNO is set to 0
>> (SUCCESS) and
>> sometimes ERRNO is set to 11 (Ressource temporarily not available).
>> What
>> do theese different ERRNOs mean? Can I understand ERRNO=11 as
>> "there is
>> no PUB socket connected"? (I bind the SUB and connect the PUB!)
>
> If you have a look at zmq_poll man page you'll find out that zmq_poll
> waits *up to* specified number of microseconds. So yes, it can return
> prematurely. However, new version of 0MQ (2.1) honour the timeout
> precisely.
>
> When timeout is reached, zmq_poll returns 0 but does not set the
> error.
> That means that errno can contain an error returned by some previous
> function or somesuch.
>
> HTH
> Martin
>
> _______________________________________________
> 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