how to do task-level parallelism in Windows?

Discussion in 'Ruby' started by Zd Yu, May 11, 2011.

  1. Zd Yu

    Zd Yu Guest

    I want to achieve better performance through parallelism. The
    thread-level parallelism is not an option, because it is not *really*

    In Linux, kernel.fork makes it easy to achieve task level parallelism.

    In windows, kernel.spawn seems to be the most closed equivalent.
    However, it requires to specify the ruby.exe location and script
    location explicitly, which may be not available at runtime.

    Is there a better way to achieve task level parallelism in Windows?
    Zd Yu, May 11, 2011
    1. Advertisements

  2. Is jruby acceptable? Jruby threads do make use of multiple processors.
    Joel VanderWerf, May 11, 2011
    1. Advertisements

  3. Zd Yu

    Zd Yu Guest

    Joel VanderWerf wrote in post #997899:
    I need to use win32ole. I am afraid JRuby cannot do this.
    Zd Yu, May 11, 2011
  4. There is a jruby-win32ole gem -- I haven't used it, but it sounds like
    it may do what you want.
    Christopher Dicely, May 11, 2011
  5. Zd Yu

    Zd Yu Guest

    Christopher Dicely wrote in post #997903:
    I just tried it. It seems there are some compatible problems. My code
    does not work with JRuby + jruby-win32ole, although it works well with
    ruby + win32ole.

    The error looks like:
    ===================== `invokev': Invoke
    of: Find

    from `invokev'
    from `callN'
    from `invokeMethodOrGet'
    from `method_missing'
    from RubyWIN32OLE$i$0$0$method_missing.gen:65535:in `call'
    from `call'
    from `call'
    from `callMethodMissing'
    from `cacheAndCall'
    from `call'
    from C:\my_tool.rb:1362:in `method__98$RUBY$find'

    my code: (Excel manipulation)
    keys = @workbook.Worksheets("sheet name").Range( "A1" ).EntireRow

    current = keys.Find( value,
    false )

    it seems the 'Find' method cannot be invoked.
    Zd Yu, May 11, 2011
  6. Yes, ge ridden of windows.

    Marcio Carneiro, May 12, 2011
  7. Please report this bug at We intend for
    jruby-win32ole to be 100% compatible with MRI win32ole, and we would
    like to fix this. Thank you!

    - Charlie
    Charles Oliver Nutter, May 15, 2011
  8. Zd Yu

    Zd Yu Guest

    Zd Yu, May 16, 2011
  9. Charles Oliver Nutter, May 17, 2011
    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.