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 Thu, 26 May 2011 18:04:57 -0500
Organization Service de news de lacave.net
Lines 27
Message-ID <14c3e3348dad2faa9ac1b39fdfe4bb6b@ruby-forum.com> (permalink)
NNTP-Posting-Host bristol.highgroove.com
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Trace talisker.lacave.net 1306451131 39722 65.111.164.187 (26 May 2011 23:05:31 GMT)
X-Complaints-To abuse@lacave.net
NNTP-Posting-Date Thu, 26 May 2011 23:05:31 +0000 (UTC)
X-Received-From This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway
X-Mail-Count 383829
X-Ml-Name ruby-talk
X-Rubymirror Yes
X-Ruby-Talk <14c3e3348dad2faa9ac1b39fdfe4bb6b@ruby-forum.com>
Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!feed.ac-versailles.fr!talisker.lacave.net!lacave.net!not-for-mail
Xref x330-a1.tempe.blueboxinc.net comp.lang.ruby:5113

Show key headers only | 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