Code Monkey home page Code Monkey logo

Comments (5)

mighe avatar mighe commented on May 16, 2024

ImmediateExecutor does exactly what you are asking for

For some of our integration tests it would be much simpler if I could set
up our futures/etc to use a SynchronousThreadPool which would just execute
the block synchronously in the current thread.

Would this be possible or is it just a dumb idea? If the latter, I'd love
some pointers on how folks are writing integration tests with
concurrent-ruby


Reply to this email directly or view it on GitHub
#122.

from concurrent-ruby.

jdantonio avatar jdantonio commented on May 16, 2024

I was about to say the exact same thing, but @mighe was faster than me.

FYI: In the latest push to master I updated ImmediateExecutor to have the same lifecycle methods as the thread pools (shutdown, kill, running?, etc.) specifically to make it work in a broader set of tests. See here: https://github.com/ruby-concurrency/concurrent-ruby/blob/master/lib/concurrent/executor/immediate_executor.rb

from concurrent-ruby.

rtyler avatar rtyler commented on May 16, 2024

Are docs covering the use of the ImmediateExecutor? The closest I would imagine is the (apparently out of date) thread pools wiki page.

from concurrent-ruby.

jdantonio avatar jdantonio commented on May 16, 2024

Sadly, we haven't kept up with wiki the way I hoped we would (and I'm the worst at that). We are much better at keeping the Yardoc up to date. We generate the yardoc at each release.

from concurrent-ruby.

jdantonio avatar jdantonio commented on May 16, 2024

@rtyler I've updated the wiki with links to the yardoc. I also updated the aforementioned thread pool page.

from concurrent-ruby.

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.