Threadpool Implementations

Discussion in 'Ruby' started by vlad, Jun 15, 2011.

  1. vlad

    vlad Guest

    What's a good threadpool implementation that I can use?

    I'll be using it to send HTTP requests from a Rails script driven by
    script/runner.

    -- vlad
     
    vlad, Jun 15, 2011
    #1
    1. Advertisements

  2. Hi,

    Don't know if its good, this one works well for me:
    http://snippets.dzone.com/posts/show/3276 . I also use it fire away
    parallel HTTP besides other things (in my case I've three such thread
    pools).

    I only modified it slightly, removed the sleep 0.0something and replaced
    it with Thread.pass ; I also extended the #process method to also take
    args and not just a block.

    HTH,
    - Markus
     
    Markus Fischer, Jun 15, 2011
    #2
    1. Advertisements

  3. vlad

    Chuck Remes Guest

    I've had very good luck with threadz.

    https://github.com/nanodeath/threadz

    cr
     
    Chuck Remes, Jun 16, 2011
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.