From e68be0ddf451f572da2afb9020b35dbd04b45c65 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 15 Dec 2007 12:39:25 +0000 Subject: * lib/timeout.rb: join the background thread to make sure it is dead. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/timeout.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/timeout.rb') diff --git a/lib/timeout.rb b/lib/timeout.rb index 19045d949..d68312cf6 100644 --- a/lib/timeout.rb +++ b/lib/timeout.rb @@ -45,7 +45,10 @@ module Timeout } return yield(sec) ensure - y.kill if y and y.alive? + if y and y.alive? + y.kill + y.join # make sure y is dead. + end end end -- cgit