INNER CODE UNIT · Ruby

self

exAspArk/batch-loader · lib/batch_loader/executor.rb:11

    def self.current
      Thread.current[NAMESPACE]
    end

    def self.clear_current
      Thread.current[NAMESPACE] = nil
    end

    attr_reader :items_by_block, :loaded_values_by_block

    def initialize
      @items_by_block = Hash.new { |hash, key| hash[key] = Set.new }
      @loaded_values_by_block = Hash.new { |hash, key| hash[key] = {} }
    end
  end
end

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…