Ruby - Concurrent Programming
What is wrong with this Ruby code that tries to use concurrency?
threads = []
i = 0
5.times do
threads << Thread.new do
puts i
end
i += 1
end
threads.each(&:join)