Skip to content

Instantly share code, notes, and snippets.

@anildigital
Created March 2, 2016 16:16
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 anildigital/2a07d5dd5a9ac727d8d4 to your computer and use it in GitHub Desktop.
Save anildigital/2a07d5dd5a9ac727d8d4 to your computer and use it in GitHub Desktop.
# coding: utf-8
threads = []
t0 = Time.now
(1.upto(10000000)).each do |i|
threads << Thread.new do
lambda { }
end
end
threads.each { |t| t.join }
t1 = Time.now
puts t1 - t0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment