Use selectors to poll connections instead of raw select in all kinds of handlers. To solve the limitation on a maximum file handler value and dynamic choose the best poller in the system.
Why is this needed?
In the current implementation, the gevent, eventlet handler use the old select fuction which not support fd number langer than 1023 . Network Program with high numbers of opened sockets often raise Exception: filedescriptor out of range in select()
Proposed Changes
Use the selectors module which ship with official python distro >=3.4 to simulate the select interface.
Change the select fuction in all handlers to use the selectors implementation.
The selectors will choose the best poller in the system.
Use selectors to poll connections instead of raw select in all kinds of handlers. To solve the limitation on a maximum file handler value and dynamic choose the best poller in the system.
Why is this needed?
In the current implementation, the gevent, eventlet handler use the old select fuction which not support fd number langer than 1023 . Network Program with high numbers of opened sockets often raise
Exception: filedescriptor out of range in select()
Proposed Changes
selectors
module which ship with official python distro >=3.4 to simulate the select interface.selectors
implementation.selectors
will choose the best poller in the system.