method

lock_file

lock_file(file_name, &block)
private

Lock a file for a block so only one process can modify it at a time.