If I have the following code :
threads = [] (1..5).each do |i| threads << Thread.new { `process x#{i}.bin` } end threads.each do |t| t.join # i\'d l
This is a simple, and interesting way to use Thread#value:
a, b, c = [ Thread.new { "something" }, Thread.new { "something else" }, Thread.new { "what?" } ].map(&:value) a # => "something" b # => "something else" c # => "what?"