[zeromq-dev] Poller choice in configure or poller.hpp

Olaf Mandel o.mandel at menlosystems.com
Fri Feb 14 11:38:31 CET 2014


I noticed that there are two mechanisms to decide which poller
(devpoll,epoll,kqueue,poll,select) to use:

* poller.hpp makes a choice based on the operation system (e.g.
  ZMQ_HAVE_LINUX or ZMQ_HAVE_WINDOWS) unless overridden by one of the
  ZMQ_FORCE_* macros.

* configure uses the LIBZMQ_CHECK_POLLER function from acinclude.m4 to
  detect which poller to use.

This can be confusing to the casual reader of poller.hpp, as
LIBZMQ_CHECK_POLLER may make a different choice than the include file
would have made. In my case: ZMQ_HAVE_CYGWIN but ZMQ_FORCE_POLL, and I
didn't realise that the configure script sets one of the ZMQ_FORCE_* macros.

Now my first question: is this particular example (Cygwin and poll) a
bug and where? ZMQ_USE_POLL works for me up to a 1021 sockets, while
ZMQ_USE_SELECT works only up to 28 (!) sockets. What is the "correct"
default for Cygwin?

And my second question: is there a need and way to make the potential
ambiguity clearer? Possible answers:

* no, any developer is supposed to check the configure output very
* just add a comment to poller.hpp that configure sets one of the
  ZMQ_FORCE_* macros
* make the two mechanisms give the same result, if possible
* remove the poller.hpp selection mechanism


Best regards,
Olaf Mandel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140214/c9b39d7c/attachment.sig>

More information about the zeromq-dev mailing list