Closed kylemcc closed 11 years ago
Thank you for the patch. We'd like to have some additional documentation for the gearman.io
module before we merge your pull request; docstrings for each method would be greatly appreciated.
Of course, I'll add some docs and update this. Thanks!
I updated per your suggestions - docstrings in the geaman.io module, and I mocked the _register_connections_with_poller
. Let me know if there's anything else you'd like included here.
The current implementation is limited by the max number of FDs supported by select (really the max fileno). On most systems this is 1024. The updated implementation in the PR will use epoll where supported, giving better performance when multiplexing lots of connections, and supporting more connections. While I'm generally not multiplexing 1000 connections to gearman, I have noticed on production systems where connections are being opened and closed frequently, it's easy to have fileno's > 1024, making this library unusable in a lot of cases.
The polling code falls back to select when epoll is not available (non linux). A kqueue implementation may be beneficial for those using BSD, but I'll leave this to someone else for now.