提交 ce8b0cbf 编写于 作者: M Molchanov Andrey

Replacement cycle for readability

上级 dca4b9f8
......@@ -298,7 +298,7 @@ def initialize(pool, frequency)
def run
return unless frequency
Thread.new(frequency, pool) { |t, p|
while true
loop do
sleep t
p.reap
end
......@@ -618,7 +618,7 @@ def attempt_to_checkout_all_existing_connections(raise_on_acquisition_timeout =
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册