mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1261c7e055
commit
224e59c6f8
15 changed files with 250 additions and 110 deletions
|
@ -48,7 +48,7 @@ class ThreadsWait
|
|||
|
||||
def ThreadsWait.all_waits(*threads)
|
||||
tw = ThreadsWait.new(*threads)
|
||||
if iterator?
|
||||
if block_given?
|
||||
tw.all_waits do
|
||||
|th|
|
||||
yield th
|
||||
|
@ -125,7 +125,7 @@ class ThreadsWait
|
|||
def all_waits
|
||||
until @threads.empty?
|
||||
th = next_wait
|
||||
yield th if iterator?
|
||||
yield th if block_given?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue