Problem: Windows performance is not optimal due to select().

Solution: Provide poll() for Windows as well. This is a build option that
defaults to off as the resulting binary will only run on Windows Vista or
newer.

This is not tested with alternative Winsock service providers like VMCI,
but the documentation for WSAPoll does not mention limitations.

On my local machine, throughput improves by ~10 % (20 simultaneous
remote_thr workes to one local_thr, 10 byte messages), while latency
improves by ~30 % (measured with remote/local_lat).
This commit is contained in:
Michael Lutz
2016-06-11 19:14:25 +02:00
parent 8d8d32f4d0
commit 7a6ff07a01
9 changed files with 22 additions and 4 deletions

View File

@@ -36,7 +36,7 @@
// definition of pollfd structure (AIX uses 'reqevents' and 'retnevents'
// instead of 'events' and 'revents' and defines macros to map from POSIX-y
// names to AIX-specific names).
#if defined ZMQ_POLL_BASED_ON_POLL
#if defined ZMQ_POLL_BASED_ON_POLL && !defined ZMQ_HAVE_WINDOWS
#include <poll.h>
#endif