Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
require 'open-uri'
counter = 0
5.times.map do
Thread.new do
temp = counter
open('http://google.com')
counter = temp + 1
end
end.each(&:join)
puts counter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.