Skip to Content Skip to Search

class ActiveSupport::Dependencies::Interlock

Public instance methods

Source code GitHub
# File activesupport/lib/active_support/dependencies/interlock.rb, line 32
def done_running
  @lock.stop_sharing
end
Source code GitHub
# File activesupport/lib/active_support/dependencies/interlock.rb, line 24
def done_unloading
  @lock.stop_exclusive(compatible: [:load, :unload])
end
Source code GitHub
# File activesupport/lib/active_support/dependencies/interlock.rb, line 12
def loading(&block)
  @lock.exclusive(purpose: :load, compatible: [:load], after_compatible: [:load], &block)
end
Source code GitHub
# File activesupport/lib/active_support/dependencies/interlock.rb, line 40
def permit_concurrent_loads(&block)
  @lock.yield_shares(compatible: [:load], &block)
end
Source code GitHub
# File activesupport/lib/active_support/dependencies/interlock.rb, line 36
def running(&block)
  @lock.sharing(&block)
end
Source code GitHub
# File activesupport/lib/active_support/dependencies/interlock.rb, line 28
def start_running
  @lock.start_sharing
end
Source code GitHub
# File activesupport/lib/active_support/dependencies/interlock.rb, line 20
def start_unloading
  @lock.start_exclusive(purpose: :unload, compatible: [:load, :unload])
end
Source code GitHub
# File activesupport/lib/active_support/dependencies/interlock.rb, line 16
def unloading(&block)
  @lock.exclusive(purpose: :unload, compatible: [:load, :unload], after_compatible: [:load, :unload], &block)
end

Definition files