Last active
August 29, 2015 14:20
-
-
Save kwleland/4e788b9a091423118d21 to your computer and use it in GitHub Desktop.
Garbage Collector Hang Repro
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
Thread.new do | |
while true | |
sleep 10 | |
puts "heartbeat" | |
end | |
end | |
while true | |
ar = [] | |
100.times do | |
thr = Thread.new do | |
while true | |
sleep 1 | |
end | |
end | |
ar.push(thr) | |
end | |
puts ar.length | |
ar.each do |thr| | |
thr.kill | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment