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 | e68be0ddf451f572da2afb9020b35dbd04b45c65 (patch) | |
tree | 543612fca26d78ab5863a9eb10984be0e60a1207 | |
parent | 3a1b46df7163158aed1c82de532d21d00a2c87bf (diff) | |
download | ruby-e68be0ddf451f572da2afb9020b35dbd04b45c65.tar.gz ruby-e68be0ddf451f572da2afb9020b35dbd04b45c65.tar.xz ruby-e68be0ddf451f572da2afb9020b35dbd04b45c65.zip |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/timeout.rb | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Sat Dec 15 21:38:24 2007 Tanaka Akira <akr@fsij.org> + + * lib/timeout.rb: join the background thread to make sure it is dead. + Sat Dec 15 20:20:48 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * configure.in (enc/Makefile): add external encoding objects list. 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 |