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:
commit
a0b3de3002
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue