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
16 17 18 |
# File 'lib/em-synchrony/activerecord.rb', line 16 def _fibered_mutex @fibered_mutex ||= EM::Synchrony::Thread::Mutex.new end |
#connection ⇒ Object
10 11 12 13 14 |
# File 'lib/em-synchrony/activerecord.rb', line 10 def connection _fibered_mutex.synchronize do @reserved_connections[current_connection_id] ||= checkout end end |