1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #24925 from Neodelf/again_with_loop

Replacement cycle for readability
This commit is contained in:
Xavier Noria 2016-05-08 23:54:40 +02:00
commit a0b3de3002

View file

@ -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