lib/tobox/pool.rb in tobox-0.1.0 vs lib/tobox/pool.rb in tobox-0.1.1
- old
+ new
@@ -3,10 +3,12 @@
module Tobox
class Pool
def initialize(configuration)
@configuration = configuration
@num_workers = configuration[:concurrency]
- @workers = Array.new(@num_workers) { Worker.new(configuration) }
+ @workers = Array.new(@num_workers) do |idx|
+ Worker.new("tobox-worker-#{idx}", configuration)
+ end
start
end
def stop
@workers.each(&:finish!)