Prev: Why private #binding?
Next: Metaprograming
From: Lucky Nl on 10 Jun 2010 04:59 Hi, I need to implement fork concept in my application. I want to do the task1 and task2 at a time. need to start task1 and and task2 at a time but task1 will complete within seconds .but task2 will will take time,it's the long run process.so want to do this seperate process this will not interupt other process. So how can we implement fork in ruby -- Posted via http://www.ruby-forum.com/.
From: Peter Hickman on 10 Jun 2010 05:40 [Note: parts of this message were removed to make it a legal post.] What appears to be the problem with the existing implementation of fork?
From: Matthew Bloch on 10 Jun 2010 06:00 On Thu, 2010-06-10 at 17:59 +0900, Lucky Nl wrote: > Hi, > I need to implement fork concept in my application. > I want to do the task1 and task2 at a time. need to start task1 and and > task2 > at a time but task1 will complete within seconds .but task2 will will > take time,it's the long run process.so want to do this seperate > process this will not interupt other process. > So how can we implement fork in ruby I think you probably want to look at threading if your background job is written in Ruby, or IO.popen if it's not. You can still do pid = fork { ... stuff .. } in Ruby, but it's probably more complicated than you need. What is the background job you want to monitor / control? -- Matthew
|
Pages: 1 Prev: Why private #binding? Next: Metaprograming |