diff options
author | Molchanov Andrey <neodelf@gmail.com> | 2016-05-09 00:45:22 +0300 |
---|---|---|
committer | Molchanov Andrey <neodelf@gmail.com> | 2016-05-09 00:45:22 +0300 |
commit | ce8b0cbf343331b717ec2b02abc29dc5b573d1c0 (patch) | |
tree | 14089b9cca8a63bacd2157b6072dc9ed61f94ba1 /activerecord/lib | |
parent | dca4b9f82ab442ade62442ad3177c203fd1bdec7 (diff) | |
download | rails-ce8b0cbf343331b717ec2b02abc29dc5b573d1c0.tar.gz rails-ce8b0cbf343331b717ec2b02abc29dc5b573d1c0.tar.bz2 rails-ce8b0cbf343331b717ec2b02abc29dc5b573d1c0.zip |
Replacement cycle for readability
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb index 33f68d0b97..1bea16ebcc 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -298,7 +298,7 @@ module ActiveRecord def run return unless frequency Thread.new(frequency, pool) { |t, p| - while true + loop do sleep t p.reap end @@ -618,7 +618,7 @@ module ActiveRecord timeout_time = Time.now + (@checkout_timeout * 2) @available.with_a_bias_for(Thread.current) do - while true + loop do synchronize do return if collected_conns.size == @connections.size && @now_connecting == 0 remaining_timeout = timeout_time - Time.now |