method

try_to_queue_for_background_connection

rails latest stable - Class: ActiveRecord::ConnectionAdapters::ConnectionPool

Method not available on this version

This method is only available on newer versions. The first available version (v8.1.1) is shown here.

try_to_queue_for_background_connection(checkout_timeout)
private

No documentation available.

# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 1191
        def try_to_queue_for_background_connection(checkout_timeout)
          return unless @maintaining > 0

          synchronize do
            return unless @maintaining > @available.num_waiting

            # We are guaranteed the "maintaining" thread will return its promised
            # connection within one maintenance-unit of time. Thus we can safely
            # do a blocking wait with (functionally) no timeout.
            @available.poll(100)
          end
        end