class Roda::RodaPlugins::RecheckPrecompiledAssets::CompiledAssetsHash

hash methods, only a few that are used.
Thread safe wrapper for the compiled asset metadata hash. Does not wrap all

def [](key)

def [](key)
  @mutex.synchronize{@hash[key]}
end

def []=(key, value)

def []=(key, value)
  @mutex.synchronize{@hash[key] = value}
end

def each(&block)

def each(&block)
  @mutex.synchronize{@hash.dup}.each(&block)
  self
end

def initialize

def initialize
  @hash = {}
  @mutex = Mutex.new
end

def replace(hash)

def replace(hash)
  hash = hash.instance_variable_get(:@hash) if (CompiledAssetsHash === hash)
  @mutex.synchronize{@hash.replace(hash)}
  self
end

def to_json(*args)

def to_json(*args)
  @mutex.synchronize{@hash.dup}.to_json(*args)
end