module ActiveSupport::Dependencies

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