Ruby - Concurrent Programming
Identify the problem in this Ruby code that uses threads:
counter = 0
threads = 3.times.map do
Thread.new do
100.times { counter += 1 }
end
end
threads.each(&:join)
puts counter