instance method
build_async_executor
Ruby on Rails 8.0.4
Since v7.0.10 PrivateSignature
build_async_executor()
No documentation comment.
Source
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 718
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
Defined in activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb line 718
· View on GitHub
· Improve this page
· Find usages on GitHub