|
|
|
|
|
by thibaut_barrere
3899 days ago
|
|
Try that with a GIL, sure, multithreaded Python and Ruby is possible, but it's not for the faint hearted and not as easy to read. FWIW, you can use a ruby gem like typhoeus specifically for this: hydra = Typhoeus::Hydra.new
requests = (0..9).map{ Typhoeus::Request.new("www.example.com") }
requests.each{ |request| hydra.queue(request) }
# blocks until all requests are complete
hydra.run
|
|