[PATCH 1 of 4] util: add a simple poll utility
mpm at selenic.com
Wed Jun 3 18:03:54 CDT 2015
On Wed, 2015-06-03 at 13:26 -0700, Pierre-Yves David wrote:
> + if any(sys.maxint <= f for f in fds):
> + raise NotImplementedError()
Also, I'm not sure why you're testing against maxint. The actual limit
is typically something like 2048, defined in FD_SETSIZE. And the reason
for the limit is that every possible file descriptor up to that limit is
represented as a bit in the input field. A bit vector with 2^64 bits is
indeed too large.
Modern interfaces like poll/epoll don't try to pass in all the
descriptors at once and thus don't run into these limits.
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel