summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-25 11:15:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-25 11:15:33 +0000
commit87ebe411a66a608b8b73ad5c05ba6a53df1a8e08 (patch)
tree5e35cbae0aab145fc8577dc1c948b88cff7db27c /lib
parentc0b17e006cf67d0dce1e02c241805b9ebddaa00d (diff)
* 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/branches/ruby_1_8@7375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/thwait.rb7
1 files changed, 5 insertions, 2 deletions
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