summaryrefslogtreecommitdiffstats
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
commit78b286b1b946f038d1600c616200b0a09bd27871 (patch)
tree5e35cbae0aab145fc8577dc1c948b88cff7db27c /lib
parent7a5f24add460fa64289d3fbf15fb8eb59e77cf13 (diff)
downloadruby-78b286b1b946f038d1600c616200b0a09bd27871.tar.gz
ruby-78b286b1b946f038d1600c616200b0a09bd27871.tar.xz
ruby-78b286b1b946f038d1600c616200b0a09bd27871.zip
* lib/thwait.rb (ThreadsWait#join_nowait): abnormally terminated
threads should be also processed. [ruby-talk:121320] git-svn-id: http://svn.ruby-lang.org/repos/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 8549ca088..95d294a85 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