Skip to content

Instantly share code, notes, and snippets.

@jstorimer

jstorimer/gist:5051731

Last active Dec 14, 2015
Embed
What would you like to do?
array = Array.new
trap(:INT) do
p array.size
exit
end
Thread.new do
loop do
array << 2
end
end
10.times.map do
Thread.new { puts 1 }
end.each(&:join)
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.