class Async::WorkerPool
def initialize(size: Etc.nprocessors)
Create a new work pool.
def initialize(size: Etc.nprocessors) @ready = ::Thread::Queue.new size.times do @ready.push(Worker.new) end end
def initialize(size: Etc.nprocessors) @ready = ::Thread::Queue.new size.times do @ready.push(Worker.new) end end