lib/master_lock/registry.rb
# Extend all currently registered locks that have been held longer than the
# extend_interval since they were last acquired/extended. If any locks have
# expired (should not happen), it will release them.
Extend all currently registered locks that have been held longer than the
extend_interval since they were last acquired/extended. If any locks have
expired (should not happen), it will release them.
Extend all currently registered locks that have been held longer than the extend_interval since they were last acquired / extended . If any locks have expired ( should not happen ) it will release them .
def extend_locks
      locks_copy = @locks_mutex.synchronize { locks.dup }
      locks_copy.each { |registration| extend_lock(registration) }
      @locks_mutex.synchronize do
        locks.delete_if(&:released)
      end
    end
def extend_locks locks_copy = @locks_mutex . synchronize { locks . dup } locks_copy . each { | registration | extend_lock ( registration ) } @locks_mutex . synchronize do locks . delete_if ( & :released ) end end
Extend all currently registered locks that have been held longer than the
extend_interval since they were last acquired/extended.
Extend all currently registered locks that have been held longer than the extend_interval since they were last acquired / extended .
# Make a local copy of the locks array to avoid accessing it outside of the mutex.