summaryrefslogtreecommitdiff
path: root/lib/thwait.rb
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
commit0247fbae3d9b41cac9bc86b74e6a5dbd4ea20444 (patch)
treef9f6126f78846ae518c2ad605ce258d5a2c28830 /lib/thwait.rb
parent3e37ee5af18889fb3ad78194b7094ff46447f4c4 (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/trunk@7375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/thwait.rb')
-rw-r--r--lib/thwait.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/thwait.rb b/lib/thwait.rb
index 8549ca0..95d294a 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