Join a thread after sleeping : join « Threads « Ruby

Join a thread after sleeping

meaning_of_life = do
  puts "The answer is..."
  sleep 10
  puts 42

sleep 9


Related examples in the same category

1.each thread is given only one second to execute:
2.Join threads
3.Multithreaded Applications in Ruby
4.Join two threads
5.rescue the exception at the time the threads are joined.