class ActiveSupport::Concurrency::ThreadLoadInterlockAwareMonitor

def mon_exit

def mon_exit
  unless @owner == Thread.current
    raise ThreadError, "current thread not owner"
  end
  @count -= 1
  return unless @count == 0
  @owner = nil
  @mutex.unlock
end