Skip to content

Instantly share code, notes, and snippets.

@paulmooring
Created January 25, 2013 22:05
Show Gist options
  • Save paulmooring/4638334 to your computer and use it in GitHub Desktop.
Save paulmooring/4638334 to your computer and use it in GitHub Desktop.
cb_threads.rb
def pp_cookbook(cb)
pp api.get "/cookbooks/#{cb}"
end
api.get('/cookbooks').keys.first(12).each do |cb|
thrds = Array.new
thrds << Thread.new { pp_cookbook(cb) }
thrds.each do |t|
t.join
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment