6 kyu
Wait on All Threads
171moonfly
Description:
Create a method called wait_on_threads
that accepts an array of threads (can be empty) and waits until all of them finish. For example:
thread1 = Thread.new do
# do somethng
end
thread2 = Thread.new do
# do somethng else
end
wait_on_threads( [thread1,thread2] )
# Should wait inside the method until both thread1 and thread2
# finish whatever they were doing and exit.
You can read more about threads in wikipedia: http://en.wikipedia.org/wiki/Thread_(computing)
Threads
Fundamentals
Similar Kata:
Stats:
Created | Sep 25, 2014 |
Published | Sep 25, 2014 |
Warriors Trained | 560 |
Total Skips | 169 |
Total Code Submissions | 458 |
Total Times Completed | 171 |
Ruby Completions | 171 |
Total Stars | 3 |
% of votes with a positive feedback rating | 85% of 56 |
Total "Very Satisfied" Votes | 43 |
Total "Somewhat Satisfied" Votes | 9 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 31 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 8 kyu |