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
commit008afdc787618c39c52cc338a61d804cdb6ba795 (patch)
treef9f6126f78846ae518c2ad605ce258d5a2c28830 /lib
parent18c32ede7d82cd83d5f650eef8ceaa06d6cf8d3f (diff)
downloadruby-008afdc787618c39c52cc338a61d804cdb6ba795.tar.gz
ruby-008afdc787618c39c52cc338a61d804cdb6ba795.tar.xz
ruby-008afdc787618c39c52cc338a61d804cdb6ba795.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/trunk@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