Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@xjz9600

Description

@xjz9600

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions