[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

fork not available?

walter

9/19/2003 4:51:00 PM

I am running windows 2000 using the PragProgs install.

I have tried fork but get an unimplemented on this machine error. I
have tried this on multiple windows 2000 machines and get the same
error.

I have tried IO.popen("-") but just get an error stating that "-" is
not recognized.

I am trying to get a long running program to use 2 separate
processors. I have tried using Ruby's threads but the code is very
database intensive and appears to block a lot so I do not see a speed
improvement. The code is separated enough that I should be able to
cut the overall time significantly if I can get the 2 parts to run on
separate processors.

I am missing something stupid? Any thoughts?


Thanks,

Walt
*****************************************************
Walter Szewelanczyk
IS Director
M.W. Sewall & CO. email : walter@mwsewall.com
259 Front St. Phone : (207) 442-7994 x 128
Bath, ME 04530 Fax : (207) 443-6284
*****************************************************


1 Answer

Tim Hammerquist

9/19/2003 5:41:00 PM

0

walter@mwsewall.com graced us by uttering:
> I am running windows 2000 using the PragProgs install.
>
> I have tried fork but get an unimplemented on this machine
> error. I have tried this on multiple windows 2000 machines and
> get the same error.

> I am trying to get a long running program to use 2 separate
> processors. I have tried using Ruby''s threads but the code is very
> database intensive and appears to block a lot so I do not see a speed
> improvement. The code is separated enough that I should be able to
> cut the overall time significantly if I can get the 2 parts to run on
> separate processors.
>
> I am missing something stupid? Any thoughts?

I also had a hard time finding the reason for this, but it would
seem to be the main: MS Windows operating systems do not support
the fork() call.

I thought there might be a hack to emulate forking on Win32, like
Perl 5.6 (buggily) did, but all I could find was a paragraph in
the online docs saying, "fork is available on operating systems
which support it."

I did manage to find this in the Ruby FAQs. It partially
addresses this.

http://www.rubygarden.org/iowa/faqtotum/abpj6eTY2skY/d/...

HTH,
Tim Hammerquist
--
It''s astonishing how much trouble one can
get oneself into, if one works at it.
-- Destruction, The Sandman