pool icon indicating copy to clipboard operation
pool copied to clipboard

channelPool中的conns为什么要生命成指针类型

Open xjz9600 opened this issue 2 years ago • 0 comments

type channelPool struct { mu sync.RWMutex conns chan *idleConn factory func() (interface{}, error) close func(interface{}) error ping func(interface{}) error idleTimeout, waitTimeOut time.Duration maxActive int openingConns int connReqs []chan connReq } 里面的conns为啥要使用chan *idleConn,直接使用chan idleConn不可以吗?

xjz9600 avatar Nov 22 '23 08:11 xjz9600