Class: JustOneLock::BaseLocker

Inherits:
Object
  • Object
show all
Defined in:
lib/just_one_lock/base_locker.rb

Direct Known Subclasses

BlockingLocker, NonBlockingLocker

Instance Method Summary collapse

Instance Method Details

#already_locked(scope) ⇒ Object



2
3
4
5
6
# File 'lib/just_one_lock/base_locker.rb', line 2

def already_locked(scope)
  msg = "Another process <#{scope}> already is running"
  JustOneLock.puts msg
  raise JustOneLock::AlreadyLocked, msg
end