Class | ActiveRecord::ConnectionAdapters::ConnectionPool |
In: |
lib/active_record/fiber_patches.rb
|
Parent: | Object |
ActiveRecord‘s connection pool is based on threads. Since we are working with EM and a single thread, multiple fiber design, we need to provide our own connection pool that keys off of Fiber.current so that different fibers running in the same thread don‘t try to use the same connection.