code: @Override
      public Connection<CL> borrowConnection(int timeout) throws ConnectionException {
          Connection<CL> connection = null;
          long startTime = System.currentTimeMillis();
          try {
              // Try to get a free connection without blocking.
              connection = availableConnections.poll();
              if (connection != null) {
                  return connection;
              }
  
              boolean isOpenning = tryOpenAsync();
  
              // Wait for a connection to free up or a new one to be opened
              if (timeout > 0) {
                  connection = waitForConnection(isOpenning ? config.getConnectTimeout() : timeout);
                  return connection;
              }
              else
                  throw new PoolTimeoutException("Fast fail waiting for connection from pool")
                          .setHost(getHost())
                          .setLatency(System.currentTimeMillis() - startTime);
          }
          finally {
              if (connection != null) {
                  borrowedCount.incrementAndGet();
                  monitor.incConnectionBorrowed(host, System.currentTimeMillis() - startTime);
              }
          }
      }
docs: Create a connection as long the max hasn't been reached
  
  @param timeout
  - Max wait timeout if max connections have been allocated and
  pool is empty. 0 to throw a MaxConnsPerHostReachedException.
  @return
  @throws TimeoutException
  if timeout specified and no new connection is available
  MaxConnsPerHostReachedException if max connections created
  and no timeout was specified