Skip to content

Instantly share code, notes, and snippets.

@jstorimer
Last active December 14, 2015 07:38
Show Gist options
  • Save jstorimer/5051731 to your computer and use it in GitHub Desktop.
Save jstorimer/5051731 to your computer and use it in GitHub Desktop.
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