Method: ActiveRecord::ConnectionAdapters::ConnectionPool::Reaper.register_pool
- Defined in:
- activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb
.register_pool(pool, frequency) ⇒ Object
:nodoc:
29 30 31 32 33 34 35 36 37 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb', line 29 def register_pool(pool, frequency) # :nodoc: @mutex.synchronize do unless @threads[frequency]&.alive? @threads[frequency] = spawn_thread(frequency) end @pools[frequency] ||= [] @pools[frequency] << WeakRef.new(pool) end end |