module Circuitry::Processors::Batcher

Public Class Methods

flush() click to toggle source
# File lib/circuitry/processors/batcher.rb, line 14
def flush
  while (block = pool.shift)
    safely_process(&block)
  end
end
process(&block) click to toggle source
# File lib/circuitry/processors/batcher.rb, line 9
def process(&block)
  raise ArgumentError, 'no block given' unless block_given?
  pool << block
end