class ConnectionPool::TimedStack

def reserve_idle_connection(idle_seconds)

This requires that the stack is kept in order of checked in time (oldest first).
This method returns the oldest idle connection if it has been idle for more than idle_seconds.

This is an extension point for TimedStack and is called with a mutex.
#
def reserve_idle_connection(idle_seconds)
  return unless idle_connections?(idle_seconds)
  @created -= 1 unless @created == 0
  @que.shift.first
end