Giter Site home page Giter Site logo

Comments (7)

EricTheMagician avatar EricTheMagician commented on July 19, 2024

I'm all for it. It would make distribution / compilation easier by removing CK as a dependency.

I've never had to ensure thread safety with queues, so I sought out for solutions because I didn't want to screw it up.
If you have any suggestions, on which implementation to use, let me know.
I'm starting to notice cracks with CK and I'd rather change soon rather later, especially since I'm using the wrong type's of queues.

I think I might go with this one:
https://github.com/mstump/queues/blob/master/include/mpsc-queue.hpp

from fusejs.

c4milo avatar c4milo commented on July 19, 2024

it doesn't seem to be circular.

from fusejs.

c4milo avatar c4milo commented on July 19, 2024

I would say, let's go with a regular implementation, if we ever hit an issue due to lock contention, we then can look into the lock-free circular queue in more detail as it doesn't seem to be that simple.

from fusejs.

EricTheMagician avatar EricTheMagician commented on July 19, 2024

https://github.com/fsaintjacques/disruptor--/blob/develop/disruptor/ring_buffer.h
Probably.

from fusejs.

c4milo avatar c4milo commented on July 19, 2024

@thejinx0r yes! Disruptor FTW.

from fusejs.

EricTheMagician avatar EricTheMagician commented on July 19, 2024

I started exploring https://github.com/redjack/varon-t/ in favor of disruptor--, since it was more feature complete.

One oversight with disruptor is that each producer/consumer needs to be contained within a thread. This does not play well with design principles of nodejs/iojs. The event loop of nodejs is run in one thread, which the consumer must be in. But this consumer will block the thread and prevent setTimeouts from running.

In the meantime, I have implemented a simple MPSC queue and enabled multithreaded by default.

from fusejs.

c4milo avatar c4milo commented on July 19, 2024

That's a reasonable first step. Nice work @thejinx0r!

from fusejs.

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.