@@ -67,7 +67,7 @@ type pool struct {
67
67
68
68
maintainInterval time.Duration // maintainInterval is the maintain() loop interval.
69
69
cancelBackground context.CancelFunc // cancelBackground is called to signal background goroutines to stop.
70
- backgroundDone * sync.WaitGroup // stopDone waits for all background goroutines to return.
70
+ backgroundDone * sync.WaitGroup // backgroundDone waits for all background goroutines to return.
71
71
72
72
connsCond * sync.Cond // connsCond guards conns, newConnWait.
73
73
conns map [uint64 ]* connection // conns holds all currently open connections.
@@ -94,7 +94,7 @@ func connectionPerished(conn *connection) (string, bool) {
94
94
return "" , false
95
95
}
96
96
97
- // newPool creates a new pool that will hold size number of idle connections . It will use the
97
+ // newPool creates a new pool. It will use the
98
98
// provided options when creating connections.
99
99
func newPool (config poolConfig , connOpts ... ConnectionOption ) (* pool , error ) {
100
100
opts := connOpts
@@ -148,7 +148,7 @@ func (p *pool) connect() error {
148
148
p .generation .connect ()
149
149
150
150
// Create a Context with cancellation that's used to signal the createConnections() and
151
- // maintain() background goroutines to stop. Also create a "disconnectDone " WaitGroup that is
151
+ // maintain() background goroutines to stop. Also create a "backgroundDone " WaitGroup that is
152
152
// used to wait for the background goroutines to return. Always create a new Context and
153
153
// WaitGroup each time we start new set of background goroutines to prevent interaction between
154
154
// current and previous sets of background goroutines.
@@ -804,7 +804,7 @@ func (w *wantConn) waiting() bool {
804
804
}
805
805
}
806
806
807
- // tryDeliver attempts to deliver pc , err to w and reports whether it succeeded.
807
+ // tryDeliver attempts to deliver conn , err to w and reports whether it succeeded.
808
808
func (w * wantConn ) tryDeliver (conn * connection , err error ) bool {
809
809
w .mu .Lock ()
810
810
defer w .mu .Unlock ()
0 commit comments