module ActiveSupport::Dependencies

def self.unload_interlock

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
  Dependencies.interlock.unloading { yield }
end