PyAPNs icon indicating copy to clipboard operation
PyAPNs copied to clipboard

Use poll() instead of select() if available

Open lnqs opened this issue 9 years ago • 0 comments

select() doesn't work with file-descriptiors > FD_SETSIZE, which is 1024 per default. In long-running processes that use a lot of FDs, this limit can be reached quickly, causing the calls to select() to fail.

poll() doesn't have this restriction, while it is available on most systems. Therefore, it is used over select() if possible. On systems where it isn't available (esp. older versions of windows), the code falls back to utilize select().

lnqs avatar Mar 24 '16 08:03 lnqs