aboutsummaryrefslogtreecommitdiffstats
path: root/lib/timeout.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/timeout.rb')
-rw-r--r--lib/timeout.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb
index 19045d9491..d68312cf6d 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