[ad_1]
I’m trying to execute Ruby functions in separate processes on my Windows system. On Mac, I used the Fork
method. But that doesn’t work on Windows. I also tried the spawn
method. But that doesn’t seem to work either.
def test_1
puts "Hello"
end
def test_2
puts " World"
end
pid_1 = Fork.do
test_1
end
pid_2 = Fork.do
test_2
end
Process.waitall
pid_1 = Process.spawn(test_1)
pid_2 = Process.spawn(test_2)
Process.waitall
Can someone help me in understanding what I’m missing.
[ad_2]