ruby/benchmark/bm_vm_thread_close.rb

7 строки
114 B
Ruby

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