Giter Club home page Giter Club logo

Comments (6)

ask avatar ask commented on May 28, 2024

Sorry if this is a stupid question but why does unrelated fd's affect the select operation? I assume the other fds are not part of the fd_set, right?

Apparently FD_SETSIZE is initialized to 1024 by default (at least on OS X), and is not affected by the current kernel limit, but the man page says it's possible to define a custom value before including sys/types.h,
could this help you think?

I'm not against using poll, just want to understand the issue

from librabbitmq.

ask avatar ask commented on May 28, 2024

Btw, just found out that Linux does not allow you to redefine FD_SETSIZE:
http://daniel.haxx.se/docs/poll-vs-select.html

Also it says that poll is not available on "older unixes", not sure what old means here, it may mean ancient ones that we don't compile for anyway. I think we can handle those cases if they are reported.

from librabbitmq.

ask avatar ask commented on May 28, 2024

Please open a pull request

from librabbitmq.

mayfield avatar mayfield commented on May 28, 2024

Sounds good, I have a patch in my fork, but it's really dumb right now. I need to add error checking and possibly emulate the same while loop used by the select call to avoid being triggered by unrelated signals.

from librabbitmq.

mayfield avatar mayfield commented on May 28, 2024

Pull request sent; I should mention I haven't actually tested it on anything other than modern Linux, but I did verify OSX has a /usr/include/sys/poll.h and their man page suggests its poll() uses the same call signature as glibc.

from librabbitmq.

ask avatar ask commented on May 28, 2024

Pull request merged!

from librabbitmq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.