lib/zookeeper/locker.rb
# a non-blocking lock
# returns false if your client did not receive the lock
# requires calling #unlock! if you *did* get the lock.
# @see ZooKeeper::Locker#unlock!
# @see ZooKeeper::Locker#with_lock
# @example
#   locker = zk.locker("booyah")
#   locker.lock! # => true or false depending on if you got the lock or not
#   locker.unlock!
a non-blocking lock
returns false if your client did not receive the lock
requires calling #unlock. if you *did* get the lock.
a non - blocking lock returns false if your client did not receive the lock requires calling #unlock . if you * did * get the lock .
def lock!
      create_lock_file!
      if have_first_lock?(false)
        @locked = true
      else
        cleanup_lock_file!
        false
      end
    end
def lock! create_lock_file! if have_first_lock? ( false ) @locked = true else cleanup_lock_file! false end end
a non-blocking lock
returns false if your client did not receive the lock
requires calling #unlock!
a non - blocking lock returns false if your client did not receive the lock requires calling #unlock!
see
None
see
None
example
None