Skip to content

Instantly share code, notes, and snippets.

@nandokakimoto
Created July 25, 2017 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nandokakimoto/807ff6e09f78fb6ad6d162ea3c4373a2 to your computer and use it in GitHub Desktop.
Save nandokakimoto/807ff6e09f78fb6ad6d162ea3c4373a2 to your computer and use it in GitHub Desktop.
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