Giter Club home page Giter Club logo

Comments (6)

schveiguy avatar schveiguy commented on June 23, 2024

ping @Abscissa this may be something you've experienced.

from eventcore.

schveiguy avatar schveiguy commented on June 23, 2024

Hm... I take it back, it actually gets freed synchronously, but BEFORE the final GC. So it's guaranteed to segfault.

Like I said, I'm not sure exactly how to solve it. Perhaps you can check if any sockets/contexts are open, and if so, don't free it (and use C malloc to allocate the driver).

from eventcore.

schveiguy avatar schveiguy commented on June 23, 2024

I'm going to work on a potential PR to fix this. I think it actually can be done without leaving any lingering resources -- you just have to defer destruction of the class until all the resources are released. Still have to allocate on the C heap though.

from eventcore.

schveiguy avatar schveiguy commented on June 23, 2024

OMG, I just realized, this was fixed by @s-ludwig 11 days ago in #87. I've been looking at my local download of eventcore debugging this. So hey, thanks for fixing it before I even discovered it, that's some service! 😜

from eventcore.

schveiguy avatar schveiguy commented on June 23, 2024

BTW, for the PR I was going to write, I had conceived of having the release resources function calling dispose automatically if dispose was already requested, but delayed due to still having open FDs. You'd just need a callback of some kind in the drivers that need it.

from eventcore.

s-ludwig avatar s-ludwig commented on June 23, 2024

I was originally going to implement it that way, too, but figured that since the application is usually shut down anyway, and the case where just a thread is shut down is more difficult to support correctly, it was better to just emit a warning and leave the OS clean up the rest. Emitting a warning and shutting down the driver lazily would of course have been better, but the gain/effort ratio currently was just not high enough for me.

from eventcore.

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.