[zeromq-dev] Problems with zmq_poll

Brian Granger ellisonbg at gmail.com
Tue Feb 16 21:14:39 CET 2010


> No, the problem are the return values from zmq_poll. You are handling them
> this way:
>    rc = zmq_poll(pollitems, nsockets, timeout)
>    if rc != 0:
>        raise ZMQError(zmq_strerror(errno))
> zmq_poll returns number of items signaled, -1 in the case of error or 0 in
> case of timeout.

Thanks for catching this.  I have a working Python version of poll
now.  If I understand this correctly, the return value of
zmq_poll is for informational purposes - I don't have to use it in any
way.  I can simply return the entire list - the sockets
that were not signaled will just not have any flags set?



Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu
ellisonbg at gmail.com

More information about the zeromq-dev mailing list