-
-
Save nandokakimoto/807ff6e09f78fb6ad6d162ea3c4373a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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