lib/pharos/phase.rb
def throttled_work(name, size, &block)
      size = 1 if size < 1
      task = Concurrent::Future.execute(executor: worker_pool(name, size), &block)
      raise(task.reason) if task.value.nil? && task.reason.is_a?(Exception)

      task.value
    end
# Blocks until work is done via pool of workers
# @param name [String]
# @param size [Integer]
Blocks until work is done via pool of workers
Blocks until work is done via pool of workers
def throttled_work(name, size, &block)
      size = 1 if size < 1
      task = Concurrent::Future.execute(executor: worker_pool(name, size), &block)
      raise(task.reason) if task.value.nil? && task.reason.is_a?(Exception)
      task.value
    end
def throttled_work ( name , size , & block ) size = 1 if size < 1 task = Concurrent :: Future . execute ( executor : worker_pool ( name , size ) , & block ) raise ( task . reason ) if task . value . nil? && task . reason . is_a? ( Exception ) task . value end
Blocks until work is done via pool of workers
Blocks until work is done via pool of workers
name
size
block
None