Exit a thread : exit « Threads « Ruby






Exit a thread


t3 = Thread.new do
  sleep 20
  Thread.exit            
  puts "Can't happen!"   
end

 








Related examples in the same category