From 5fcbf61023c607f8c155e623c902f6562093c6b8 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@14243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/timeout.rb | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1ff2f28acd..d09277caac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Dec 15 21:38:24 2007 Tanaka Akira + + * lib/timeout.rb: join the background thread to make sure it is dead. + Sat Dec 15 20:20:48 2007 Nobuyoshi Nakada * configure.in (enc/Makefile): add external encoding objects list. 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 -- cgit v1.2.3