正體中文版在 這裡 。(Traditional Chinese version is here .) Thread Lifecycle Create a new thread: puts "main thread start" t1=Thread.new{ puts "new thread" } puts "main thread end" Remember, if you didn't join the thread instance. The new thread will be interrupt when the main thread ended. Try following code: puts "main thread start" t1=Thread.new{ sleep 5 puts "new thread" } # sleep 10 # uncomment this line and try again puts "main thread end" Join the thread t1: puts "main thread start" t1=Thread.new{ sleep 5 puts "new thread" } t1.join puts "main thread end" But if you want 2 or more threads run at the same time. Don't join right after new it: puts "main thread start" t1=Thread.new{ sleep 5 puts "new thread 1" } t1.join # main thread will wait here until thread t1 finished t2=Thread.new{ sleep 5 puts "new thread 2" } #t1.join # should place here t