class ActiveRecord::ConnectionAdapters::ConnectionPool::LeaseRegistry

:nodoc:

def [](context)

def [](context)
  @mutex.synchronize do
    @map[context] ||= Lease.new
  end
end

def clear

def clear
  @mutex.synchronize do
    @map.clear
  end
end

def initialize

:nodoc:
def initialize
  @mutex = Mutex.new
  @map = WeakThreadKeyMap.new
end