Module: Kreator::Tools::FileMutationLocks

Defined in:
lib/kreator/tools/file_mutation_locks.rb

Class Method Summary collapse

Class Method Details

.with(path) ⇒ Object



11
12
13
14
# File 'lib/kreator/tools/file_mutation_locks.rb', line 11

def with(path, &)
  lock = @guard.synchronize { @locks[path] ||= Mutex.new }
  lock.synchronize(&)
end