Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #5113

ruby fork (thread like) on windows

From Adam Lauper <adamlauper@gmail.com>
Newsgroups comp.lang.ruby
Subject ruby fork (thread like) on windows
Date 2011-05-26 18:04 -0500
Organization Service de news de lacave.net
Message-ID <14c3e3348dad2faa9ac1b39fdfe4bb6b@ruby-forum.com> (permalink)

Show all headers | View raw


Hi All,

I'm trying to upload a number of large files to s3.  I want to do this
in parallel using threads, but it looks like the s3 gems for windows
aren't thread safe.

I then started looking into fork.  Memory/process creation time
aren't a limiting factor.

****
So the question is:  How can I create a thread like experience using
fork
(or something similar).  I want it to run only a subset of the entire
program (ideally what's in the block) and I want to wait for it to
finish.
****

I tried win32/process#fork, but it runs the entire program twice.  And
open("|-", "r") isn't supported on windows either.

Any ideas are appreciated...

Adam

-- 
Posted via http://www.ruby-forum.com/.

Back to comp.lang.ruby | Previous | NextNext in thread | Find similar | Unroll thread


Thread

ruby fork (thread like) on windows Adam Lauper <adamlauper@gmail.com> - 2011-05-26 18:04 -0500
  Re: ruby fork (thread like) on windows Roger Pack <rogerpack2005@gmail.com> - 2011-05-26 18:44 -0500
    Re: ruby fork (thread like) on windows Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-05-26 20:05 -0500

csiph-web