Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xjz9600 opened this issue Nov 22, 2023 · 0 comments
Open

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

xjz9600 opened this issue Nov 22, 2023 · 0 comments

Comments

@xjz9600
Copy link

xjz9600 commented Nov 22, 2023

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不可以吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant