mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
6b9027bd1c
In the multi_thread_pool executor it's possible to have a database configuration that wouldn't work well with a thread exectutor. This change checks the `@db_config.max_threads` and if it is not greater than 0 we won't create a thread pool for that configuration. Database configurations without a proper value set for `max_threads` will return a `nil` async executor and will run queries for those connection pools in the foreground. This allows applications to more easily control which database configurations in their app support async queries. In this setup one database coule be configured to run parallel queries while all other databases run queries in the foreground. |
||
---|---|---|
.. | ||
active_record | ||
arel | ||
rails/generators | ||
active_record.rb | ||
arel.rb |