class ActiveRecord::ConnectionAdapters::ConnectionPool

def build_async_executor

Experimental RBS support (using type sampling data from the type_fusion project).

def build_async_executor: () -> nil

This signature was generated using 1 sample from 1 application.

def build_async_executor
  case ActiveRecord.async_query_executor
  when :multi_thread_pool
    if @db_config.max_threads > 0
      Concurrent::ThreadPoolExecutor.new(
        min_threads: @db_config.min_threads,
        max_threads: @db_config.max_threads,
        max_queue: @db_config.max_queue,
        fallback_policy: :caller_runs
      )
    end
  when :global_thread_pool
    ActiveRecord.global_thread_pool_async_query_executor
  end
end