func (c *dialCall) dial(addr string) {
	const singleUse = false  
	c.res, c.err = c.p.t.dialClientConn(addr, singleUse)
	close(c.done)
	c.p.mu.Lock()
	delete(c.p.dialing, addr)
	if c.err == nil {
		c.p.addConnLocked(addr, c.res)
	}
	c.p.mu.Unlock()
}
run in its own goroutine.
package http2
import (
	"crypto/tls"
	"net/http"
	"sync"
)
type ClientConnPool interface {
	GetClientConn(req *http.Request, addr string) (*ClientConn, error)
	MarkDead(*ClientConn)
}
type clientConnPoolIdleCloser interface {
	ClientConnPool
	closeIdleConnections()
}
var (
	_ clientConnPoolIdleCloser = (*clientConnPool)(nil)
	_ clientConnPoolIdleCloser = noDialClientConnPool{}
)
type clientConnPool struct {
	t *Transport
	mu sync.Mutex  
	conns        map[string][]*ClientConn  
	dialing      map[string]*dialCall      
	keys         map[*ClientConn][]string
	addConnCalls map[string]*addConnCall  
}
func (p *clientConnPool) GetClientConn(req *http.Request, addr string) (*ClientConn, error) {
	return p.getClientConn(req, addr, dialOnMiss)
}
const (
	dialOnMiss   = true
	noDialOnMiss = false
)
func (p *clientConnPool) shouldTraceGetConn(st clientConnIdleState) bool {
	if _, ok := p.t.ConnPool.(noDialClientConnPool); !ok {
		return true
	}
	return !st.freshConn
}
func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMiss bool) (*ClientConn, error) {
	if isConnectionCloseRequest(req) && dialOnMiss {
		traceGetConn(req, addr)
		const singleUse = true
		cc, err := p.t.dialClientConn(addr, singleUse)
		if err != nil {
			return nil, err
		}
		return cc, nil
	}
	p.mu.Lock()
	for _, cc := range p.conns[addr] {
		if st := cc.idleState(); st.canTakeNewRequest {
			if p.shouldTraceGetConn(st) {
				traceGetConn(req, addr)
			}
			p.mu.Unlock()
			return cc, nil
		}
	}
	if !dialOnMiss {
		p.mu.Unlock()
		return nil, ErrNoCachedConn
	}
	traceGetConn(req, addr)
	call := p.getStartDialLocked(addr)
	p.mu.Unlock()
	<-call.done
	return call.res, call.err
}
type dialCall struct {
	_    incomparable
	p    *clientConnPool
	done chan struct{}  
	res  *ClientConn    
	err  error          
}
func (p *clientConnPool) getStartDialLocked(addr string) *dialCall {
	if call, ok := p.dialing[addr]; ok {
		return call
	}
	call := &dialCall{p: p, done: make(chan struct{})}
	if p.dialing == nil {
		p.dialing = make(map[string]*dialCall)
	}
	p.dialing[addr] = call
	go call.dial(addr)
	return call
}