From: Joel VanderWerf Date: 2006-10-25T09:38:57+09:00 Subject: Re: run test scripts concurrently Paul Lutus wrote: > ara.t.howard@noaa.gov wrote: > >> threads.each{|t| t.join} > > In my expereince, if you join all the spawned threads to the current thread, > this guarantees that they will run sequentially. They will certainly run, > which is a good thing, but they won't run concurrently. > > BTW I am not saying this about threads in general, I am saying it about Ruby > threads. This seems concurrent to me, or did you mean something different: threads = (0..9).map {|i| Thread.new {sleep rand(5); puts i}} threads.each {|t| t.join} __END__ Output: 4 8 9 0 7 5 2 1 6 3 -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407