ruby--ruby/benchmark/vm_thread_close.rb

7 lines
114 B
Ruby

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