diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-15 12:39:25 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-15 12:39:25 +0000 |
commit | 5fcbf61023c607f8c155e623c902f6562093c6b8 (patch) | |
tree | 543612fca26d78ab5863a9eb10984be0e60a1207 /lib | |
parent | bdce0db7b5ed04abe4fa5a76f98b37712ff47e2e (diff) | |
download | ruby-5fcbf61023c607f8c155e623c902f6562093c6b8.tar.gz |
* lib/timeout.rb: join the background thread to make sure it is dead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/timeout.rb | 5 |
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 |