Class: ActiveRecord::ConnectionAdapters::ConnectionPool
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::ConnectionPool
- Defined in:
- lib/em-synchrony/activerecord.rb
Instance Method Summary collapse
Instance Method Details
#_fibered_mutex ⇒ Object
24 25 26 |
# File 'lib/em-synchrony/activerecord.rb', line 24 def _fibered_mutex @fibered_mutex ||= EM::Synchrony::Thread::Mutex.new end |
#connection ⇒ Object
11 12 13 14 15 |
# 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 |