code: private boolean usePendingAcquisition(SessionProtocol desiredProtocol, PoolKey key,
                                            CompletableFuture<PooledChannel> promise,
                                            ClientConnectionTimingsBuilder timingsBuilder) {
  
          if (desiredProtocol == SessionProtocol.H1 || desiredProtocol == SessionProtocol.H1C) {
              // Can't use HTTP/1 connections because they will not be available in the pool until
              // the request is done.
              return false;
          }
  
          final CompletableFuture<PooledChannel> pendingAcquisition =
                  getPendingAcquisition(desiredProtocol, key);
  
          if (pendingAcquisition == null) {
              return false;
          }
  
          timingsBuilder.pendingAcquisitionStart();
          pendingAcquisition.handle((pch, cause) -> {
              timingsBuilder.pendingAcquisitionEnd();
  
              if (cause == null) {
                  final SessionProtocol actualProtocol = pch.protocol();
                  if (actualProtocol.isMultiplex()) {
                      promise.complete(pch);
                  } else {
                      // Try to acquire again because the connection was not HTTP/2.
                      // We use the exact protocol (H1 or H1C) instead of 'desiredProtocol' so that
                      // we do not waste our time looking for pending acquisitions for the host
                      // that does not support HTTP/2.
                      final PooledChannel ch = acquireNow(actualProtocol, key);
                      if (ch != null) {
                          promise.complete(ch);
                      } else {
                          connect(actualProtocol, key, promise, timingsBuilder);
                      }
                  }
              } else {
                  // The pending connection attempt has failed.
                  connect(desiredProtocol, key, promise, timingsBuilder);
              }
              return null;
          });
  
          return true;
      }
docs: Tries to use the pending HTTP/2 connection to avoid creating an extra connection.
  
  @return {@code true} if succeeded to reuse the pending connection.