module ActiveSupport::Dependencies

def self.clear

internal state of the descendants tracker, or reloading routes.
reload. That involves more things, like deleting unloaded classes from the
Rails.application.reloader.reload! is the public interface for application

Private method that reloads constants autoloaded by the main autoloader.
def self.clear
  unload_interlock do
    _autoloaded_tracked_classes.clear
    autoloader.reload
  end
end

def self.eager_load?(path)

Private method that helps configuring the autoloaders.
def self.eager_load?(path)
  _eager_load_paths.member?(path)
end

def self.load_interlock(&block)

block at the same time.
preventing any other thread from being inside a #run_interlock
Execute the supplied block while holding an exclusive lock,
def self.load_interlock(&block)
  interlock.loading(&block)
end

def self.run_interlock(&block)

concurrent loads.
Execute the supplied block without interference from any
def self.run_interlock(&block)
  interlock.running(&block)
end

def self.search_for_file(relpath)

Private method used by require_dependency.
def self.search_for_file(relpath)
  relpath += ".rb" unless relpath.end_with?(".rb")
  autoload_paths.each do |autoload_path|
    abspath = File.join(autoload_path, relpath)
    return abspath if File.file?(abspath)
  end
  nil
end

def self.unload_interlock(&block)

block at the same time.
preventing any other thread from being inside a #run_interlock
Execute the supplied block while holding an exclusive lock,
def self.unload_interlock(&block)
  interlock.unloading(&block)
end