Uma implementação de pool de threads de ruby
#!/usr/bin/env ruby# A test script# to run do, MAX_THREADS=2 THREAD_TIMEOUT=90 ./browser_tests.rbstart_time = Time.nowrequire ‘pry’require ‘colorize’print “started #{__FILE__}n”class App MAX_THREADS = Integer(ENV[‘MAX_THREADS’]) rescue 2 THREAD_TIMEOUT = Integer(ENV[‘THREAD_TIMEOUT’]) rescue 5 def run_loop …
Continuar lendo