class Tins::Limited

def process

def process
  @tasks    = Queue.new
  @executor = create_executor
  @executor.name = @name if @name
  catch :stop do
    loop do
      yield self
    end
  ensure
    wait until done?
    @executor.kill
  end
end