class ActiveSupport::Cache::FileStore
def lock_file(file_name, &block)
def lock_file(file_name, &block) if File.exist?(file_name) File.open(file_name, "r+") do |f| f.flock File::LOCK_EX yield ensure f.flock File::LOCK_UN end else yield end end
def lock_file(file_name, &block) if File.exist?(file_name) File.open(file_name, "r+") do |f| f.flock File::LOCK_EX yield ensure f.flock File::LOCK_UN end else yield end end