lib/pg_lock.rb
def lock(&block)
    result = internal_lock(&block)
    return false if result == NO_LOCK
    result
  end
# Runs the given block if an advisory lock is able to be acquired.
Runs the given block if an advisory lock is able to be acquired.
Runs the given block if an advisory lock is able to be acquired .
def lock(&block)
    result = internal_lock(&block)
    return false if result == NO_LOCK
    result
  end
def lock ( & block ) result = internal_lock ( & block ) return false if result == NO_LOCK result end
Runs the given block if an advisory lock is able to be acquired.
Runs the given block if an advisory lock is able to be acquired .
block