Git Product home page Git Product logo

Comments (5)

cheatfate avatar cheatfate commented on May 25, 2024

I need to understand when EAGAIN happens, at the end or in process?

from nim-chronos.

kdeme avatar kdeme commented on May 25, 2024

in process, the err var here contains it:

And then it gets raised by the getMessage call in the handler. The segfault happens only later on a second getMessage.

from nim-chronos.

cheatfate avatar cheatfate commented on May 25, 2024

But why you are trying to perform one more getMessage()?

from nim-chronos.

kdeme avatar kdeme commented on May 25, 2024

I don't. It gets called automatically by the handler on next data received by same DatagramTransport.

from nim-chronos.

kdeme avatar kdeme commented on May 25, 2024

I think I found the root cause of my EAGAIN error. It is due to a poll() in an async proc (which is not nice anyhow, but that was not the point).
If you look at the poll() code it makes sense that this can happen, although it requires some conditions.

A "normal" poll() which adds the async proc with the poll() inside to the callbacks and next also the readDatagramLoop handler on an Event.Read . processCallbacks must run first the async proc with poll(). Next in that poll again Event.Read for same socket, processCallbacks runs again, both callbacks are run ... et voila, EAGAIN

So I guess this can be closed, but perhaps some documentation could be added that this should not be done.

from nim-chronos.

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.