Skip to content

Instantly share code, notes, and snippets.

@jarib
Created October 27, 2009 01:29
Show Gist options
  • Save jarib/219219 to your computer and use it in GitHub Desktop.
Save jarib/219219 to your computer and use it in GitHub Desktop.
MAX_THREADS = 4
threads = []
MAX_THREADS.times do
threads << Thread.new do
browser = Celerity::Browser.new
browser.goto "..."
# etc.
end
end
# wait until all the threads have finished
threads.each { |t| t.join }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment