From 0247fbae3d9b41cac9bc86b74e6a5dbd4ea20444 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 25 Nov 2004 11:15:33 +0000 Subject: * lib/thwait.rb (ThreadsWait#join_nowait): abnormally terminated threads should be also processed. [ruby-talk:121320] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/thwait.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/thwait.rb b/lib/thwait.rb index 8549ca0884..95d294a85d 100644 --- a/lib/thwait.rb +++ b/lib/thwait.rb @@ -117,8 +117,11 @@ class ThreadsWait @threads.concat threads for th in threads Thread.start(th) do |t| - t.join - @wait_queue.push t + begin + t.join + ensure + @wait_queue.push t + end end end end -- cgit v1.2.3