Code Monkey home page Code Monkey logo

Comments (2)

enjoy-binbin avatar enjoy-binbin commented on August 26, 2024 1

thanks, this looks reasonable, please make a PR so that we can do a review

from valkey.

wkgcass avatar wkgcass commented on August 26, 2024

I looked into the related code before submitting a PR, and found that the evport implementation might not be working since 2014.

This is the first commit to evport, which uses port_get(), and this commit modified it to port_getn(), both committed by Dave Pacheco in 2012. The code in aeApiDelEvent says:

We rely on the fact that our caller has already updated the mask in the eventLoop.

Then in 2014, a small commit moves aeApiDelEvent(eventLoop, fd, mask) before modifying the properties in eventLoop, which breaks the assumption which evport relies on. Also there's no real benefit or clear reason for the modification in the discussion of the the commit.

Also I believe both evport and epoll can use the mask stored in eventLoop, without re-calculating the mask themselves.

I'll submit the PR with all the above fixes I would like to make, which is still very small.
If we finally make the conclusion that only the fix to kqueue should be applied, I would still be willing to modify the PR.

from valkey.

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.