Git Product home page Git Product logo

Comments (5)

ioquatix avatar ioquatix commented on May 18, 2024 1

Feel free to give me an update. We should add documentation to clarify this use case.

from async.

ioquatix avatar ioquatix commented on May 18, 2024

@brandonhilkert I'm happy to hear it's been super useful - if you have commercial use case please consider sponsoring a gem within the eco-system: https://github.com/socketry/community#funding

Does rb-inotify expose a file descriptor? If so, you need to put it into an Async::Wrapper and wait on it. Otherwise, it will block the task.

The other option is to use a thread to run the queue.watch and feed events back using a queue. However, that is more work and less efficient.

So, my first suggestion is to check how we can integrate it better.

from async.

brandonhilkert avatar brandonhilkert commented on May 18, 2024

I assume your comment here would be the idea, right?

from async.

ioquatix avatar ioquatix commented on May 18, 2024

Yes, that's basically it.

wrapper = Async::Wrapper.new(io)
wrapper.wait_readable

io.read

from async.

ioquatix avatar ioquatix commented on May 18, 2024

In Async 2.x world, all IO is now non-blocking, so this should be a non-issue. Please try it out and open a new issue if you are still having problems.

from async.

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.