Ruby - Concurrent Programming
What will be the output of this Ruby code?
pid = fork do puts 'Child process' end puts 'Parent process' Process.wait(pid)
pid = fork do puts 'Child process' end puts 'Parent process' Process.wait(pid)
Process.wait(pid) makes parent wait for child to finish, but parent's puts runs before waiting.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions