Created
July 23, 2015 20:45
-
-
Save Freaky/1f42c4b8e0316cbabd39 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
# Reliably hangs JRuby-9.0.0.0 | |
# jruby 9.0.0.0 (2.2.2) 2015-07-21 e10ec96 OpenJDK 64-Bit Server VM 25.51-b03 on 1.8.0_51-b16 +jit [FreeBSD-amd64] | |
require 'securerandom' | |
Array.new(4).map do | |
Thread.new do | |
100_000.times do |i| | |
print "#{Thread.current.inspect}: #{i}\n" if i % 1000 == 0 | |
key = SecureRandom.random_bytes(4) | |
hash = {} | |
hash[key] = true | |
end | |
end | |
end.map(&:join) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment