class ActiveRecord::ConnectionAdapters::ConnectionPool

Public Instance Methods

_fibered_mutex() click to toggle source
# File lib/em-synchrony/activerecord.rb, line 24
def _fibered_mutex
  @fibered_mutex ||= EM::Synchrony::Thread::Mutex.new
end
connection() click to toggle source
# File lib/em-synchrony/activerecord.rb, line 11
def connection
  _fibered_mutex.synchronize do
    @thread_cached_conns[connection_cache_key(Thread.current)] ||= checkout
  end
end