1 2 3 4 5 6
1000.times { Thread.new { sleep } } i = 0 while i<100_000 # benchmark loop 3 i += 1 IO.pipe.each(&:close) end